diff --git a/.ci/check_version.sh b/.ci/check_version.sh
new file mode 100644
index 0000000000000000000000000000000000000000..257015736b491a91d1f06eb55e327061f7293018
--- /dev/null
+++ b/.ci/check_version.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+set -e
+
+cat fsl/version.py | egrep "^__version__ += +'$CI_COMMIT_REF_NAME' *$"
diff --git a/.ci/patch_version.sh b/.ci/patch_version.sh
deleted file mode 100644
index 482e4fc4a0722f604ffc1615da5ca5738cc2bf08..0000000000000000000000000000000000000000
--- a/.ci/patch_version.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/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
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e8c55f458d6e09522bce3e47150322b3c01c83e3..792aee38e5d79796997101754ff0023b476f5aff 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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
 # sure that the version in the code is up to date
 # (i.e. equal to the tag name).
 ###################################################
 
 
-.patch_version: &patch_version
+.check_version: &check_version
   before_script:
-    - bash ./.ci/patch_version.sh
+    - bash ./.ci/check_version.sh
 
 
 ############
@@ -191,7 +191,6 @@ style:
 
 build-doc:
   <<: *only_upstream
-  <<: *patch_version
 
   tags:
    - docker
@@ -215,7 +214,7 @@ build-doc:
 
 build-pypi-dist:
   <<: *only_releases
-  <<: *patch_version
+  <<: *check_version
 
   stage: build
   image: python:3.6