From a0bc4e3061a14bfbf456a152da2c74c4e7ca66df Mon Sep 17 00:00:00 2001
From: Sydney Anne Erickson <sydney@elixxir.io>
Date: Tue, 8 Nov 2022 17:58:00 +0000
Subject: [PATCH] Update .gitlab-ci.yml

---
 .gitlab-ci.yml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f8f59495..0cba6dff 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,6 +19,7 @@ stages:
   - test
   - build
   - doc-update
+  - version_check
 
 build:
   stage: build
@@ -45,6 +46,17 @@ go-test:
     - go mod vendor -v
     - go test ./... -v
 
+version_check:
+    stage: version_check
+    only:
+        - master
+        - release
+    image: $DOCKER_IMAGE
+    script:
+        - GITTAG=$(git describe --tags)
+        - CODEVERS=$(cat utils/version.go | grep "const SEMVER =" | cut -d ' ' -f4 | tr -d '"')
+        - if [[ $GITTAG != $CODEVERS ]]; then echo "VERSION NUMBER BAD $GITTAG != $CODEVER"; exit -1; fi
+
 # This pipeline job will attempt to have pkg.go.dev update docs for xxdk-wasm.
 #
 # pkg.go.dev relies on the proxy.golang.org service (go module cache/proxy) to discover versions of
-- 
GitLab