aboutsummaryrefslogtreecommitdiff
path: root/dev/tools/check-cachekey.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dev/tools/check-cachekey.sh')
-rwxr-xr-xdev/tools/check-cachekey.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/dev/tools/check-cachekey.sh b/dev/tools/check-cachekey.sh
new file mode 100755
index 0000000000..15e3fa93cb
--- /dev/null
+++ b/dev/tools/check-cachekey.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+hash=$(md5sum dev/ci/docker/bionic_coq/Dockerfile | head -c 10)
+key=$(grep CACHEKEY: .gitlab-ci.yml)
+keyhash=${key%\"}
+keyhash=${keyhash##*-}
+if ! [ "$hash" = "$keyhash" ]; then
+ echo "Bad CACHEKEY: expected '$hash' but got '$keyhash'"
+ exit 1
+fi