ci: comment logic of set-vars.sh

This commit is contained in:
En-En 2025-08-27 00:17:25 +00:00 committed by Supreeeme
parent fe1796cfa7
commit af33f7eb12
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,7 @@
#!/bin/sh
# Find the line specifying the version number for the Rust toolchain, then
# extract that version number. Failure to do so aborts the CI run.
msrv=$(
awk '/^rust-version = "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+"$/ {
print substr($NF, 2, length($NF) - 2)
@ -10,6 +12,10 @@ if [ -z $msrv ]; then
exit 1
fi
# Check for one of two conditions to regenerate the Docker image:
# (These conditions must be met on `main` and not a PR branch, see ci.yml)
# 1. An annotated tag was found when fetching the tags at depth 1 (tags on HEAD)
# 2. "$UBUNTU_DOCKERFILE" was changed between HEAD and the prior commit (HEAD~1)
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
if ! git diff HEAD~1 --quiet -- "$UBUNTU_DOCKERFILE" ||
git describe --candidates=0; then