Skip to content
Snippets Groups Projects
Commit f3db5a05 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

CI: Change patch_version so it just checks version

parent cb88b49a
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
set -e
cat fsl/version.py | egrep "^__version__ += +'$CI_COMMIT_REF_NAME' *$"
#!/usr/bin/env bash
set -e
if [[ "x$CI_COMMIT_TAG" != "x" ]]; then
echo "Release detected - patching version - $CI_COMMIT_REF_NAME";
python -c "import fsl.version as v; v.patchVersion('fsl/version.py', '$CI_COMMIT_REF_NAME')";
fi
...@@ -123,16 +123,16 @@ variables: ...@@ -123,16 +123,16 @@ variables:
################################################### ###################################################
# The patch_version anchor contains a before_script # The check_version anchor contains a before_script
# section which is run on release builds, and makes # section which is run on release builds, and makes
# sure that the version in the code is up to date # sure that the version in the code is up to date
# (i.e. equal to the tag name). # (i.e. equal to the tag name).
################################################### ###################################################
.patch_version: &patch_version .check_version: &check_version
before_script: before_script:
- bash ./.ci/patch_version.sh - bash ./.ci/check_version.sh
############ ############
...@@ -191,7 +191,6 @@ style: ...@@ -191,7 +191,6 @@ style:
build-doc: build-doc:
<<: *only_upstream <<: *only_upstream
<<: *patch_version
tags: tags:
- docker - docker
...@@ -215,7 +214,7 @@ build-doc: ...@@ -215,7 +214,7 @@ build-doc:
build-pypi-dist: build-pypi-dist:
<<: *only_releases <<: *only_releases
<<: *patch_version <<: *check_version
stage: build stage: build
image: python:3.6 image: python:3.6
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment