Skip to content

Commit

Permalink
Merge pull request #1748 from nuno-agostinho/error/mismatching-docker…
Browse files Browse the repository at this point in the history
…-version

Docker: Raise error if VEP version and release branch mismatch
  • Loading branch information
likhitha-surapaneni authored Sep 2, 2024
2 parents 9014c51 + 88d8776 commit 1959ffd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ WORKDIR $OPT_SRC
# Add ensembl-vep files from current context
ADD . ensembl-vep

# For release branches, raise an error if VEP version does not match the branch name
RUN if expr "$BRANCH" : "^release/.*" > /dev/null ; \
then \
branch_version=$(echo $BRANCH | sed -E 's|release/([0-9]+).*|\1|g'); \
vep_version=$(grep VEP_VERSION */modules/Bio/EnsEMBL/VEP/Constants.pm | grep -Eo '[0-9]+'); \
if [ $branch_version -ne $vep_version ]; then \
echo "ERROR: VEP version $vep_version does not match version in branch name '$BRANCH'"; exit 1; \
fi; \
fi

# Clone/download repositories/libraries
RUN if [ "$BRANCH" = "main" ]; \
then export BRANCH_OPT=""; \
Expand Down

0 comments on commit 1959ffd

Please sign in to comment.