Commit 697e472e authored by Ralf Jung's avatar Ralf Jung
Browse files

catch CI job name / Coq version mismatches

parent 20c554e6
......@@ -82,6 +82,14 @@ while (( "$#" )); do # while there are arguments left
status "[prepare-opam] $KIND-pinning $PACKAGE to $VERSION"
opam pin add -y -n -k "$KIND" "$PACKAGE" "$VERSION"
PINNED_PACKAGES="$PINNED_PACKAGES $PACKAGE"
# Special treatment for "coq" package: make sure its version matches the CI job name.
if [[ "$PACKAGE" == "coq" ]]; then
# If the job name contains `coq.SOMETHING` but not `coq.$VERSION`, then it is wrong.
if fgrep -q -- "-coq." <<<"$CI_JOB_NAME" && ! fgrep -q -- "-coq.$VERSION" <<<"$CI_JOB_NAME"; then
panic "CI job name ($CI_JOB_NAME) does not match Coq version ($VERSION)"
fi
fi
done
echo
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment