Raymond Toy pushed to branch issue-363-add-version-number at cmucl / cmucl Commits: b76f49af by Raymond Toy at 2025-01-05T13:37:37-08:00 Add script to determine the appropriate version for cmucl. This is based on the value from `git describe --dirty`. If it looks like "snapshot-*", we use everything after "snapshot-". Typically it looks something like "snapshot-2024-08" if a snapshot has been made. Otherwise, current HEAD looks something "2024-08-46-g5b45c46fe-dirty". If a release has been made, it should be something like "21e". Otherwise, we get the actual value from git describe. - - - - - 1 changed file: - + bin/cmucl-version.sh Changes: ===================================== bin/cmucl-version.sh ===================================== @@ -0,0 +1,18 @@ +#!/bin/sh + +# Script to determine the cmucl version based on git describe +GIT_HASH="`(cd src; git describe --dirty 2>/dev/null || git describe 2>/dev/null)`" +# echo GIT_HASH = ${GIT_HASH} + +if expr "X${GIT_HASH}" : 'Xsnapshot-[0-9][0-9][0-9][0-9]-[01][0-9]' > /dev/null; then + # The git hash looks like snapshot-yyyy-mm-<stuff>. Remove the + # "snapshot-" part. + DEFAULT_VERSION=`expr "${GIT_HASH}" : "snapshot-\(.*\)"` +fi + +if expr "X${GIT_HASH}" : 'X[0-9][0-9][a-f]' > /dev/null; then + # The git hash looks like a release which is 3 hex digits. Use it as is. + DEFAULT_VERSION="${GIT_HASH}" +fi + +echo $DEFAULT_VERSION View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/b76f49afd8c8e57cfae3b35c... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/b76f49afd8c8e57cfae3b35c... You're receiving this email because of your account on gitlab.common-lisp.net.