Raymond Toy pushed to branch issue-464-lisp-version-uses-branch-name at cmucl / cmucl Commits: 9f682acc by Raymond Toy at 2026-01-15T15:11:09-08:00 More debugging of git-version on CI Let GIT_DESC be the result of git describe, so we know exactly what we're getting. GIT_HASH is the slightly massaged version of GIT_DESC that we want to use as the lisp version. If we can't determine the version, the error message prints out GIT_DESC so we know exactly what git describe is returning. - - - - - 1 changed file: - bin/git-version.sh Changes: ===================================== bin/git-version.sh ===================================== @@ -40,7 +40,8 @@ else # name as appropriate. This is much more informative. However, # we have to remove everything before the first slash which # contains things like "tag/" or "head/". - GIT_HASH="`(git describe --all --dirty | sed 's;^[^/]\+/;;' 2>/dev/null || git describe 2>/dev/null)`" + GIT_DESC="`(git describe --all --dirty || git describe 2>/dev/null)`" + GIT_HASH="`echo ${GIT_DESC} | sed 's;^[^/]\+/;;' 2>/dev/null" BRANCH="`git rev-parse --abbrev-ref HEAD`*" if [ `expr "X$GIT_HASH" : 'Xsnapshot-[0-9][0-9][0-9][0-9]-[01][0-9]'` != 0 ]; then @@ -54,14 +55,14 @@ else # The hash looks like the current branch with possibly more # stuff at the end. Use the hash as the version. DEFAULT_VERSION="${GIT_HASH}" - elif [ `expr "${GIT_HASH}" : "pipelines/[0-9]*"` != 0]; then + elif [ `expr "${GIT_HASH}" : "[0-9]*"` != 0]; then # Assuming this is CI which seems to produce a githash like # "pipeline/<digits>". DEFAULT_VERSION="${GIT_HASH}" fi if [ -z "$DEFAULT_VERSION" ]; then - echo "Unable to determine a default version from hash $GIT_HASH" + echo "Unable to determine a default version from git describe: $GIT_DESC" exit 1; fi fi View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/9f682acc69fc425fa62c7a2a... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/9f682acc69fc425fa62c7a2a... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)