
Raymond Toy pushed to branch issue-363-add-version-number at cmucl / cmucl Commits: 6bfaea5c by Raymond Toy at 2025-02-13T05:56:54-08:00 Clean up according to review comments. - - - - - 6f314bfb by Raymond Toy at 2025-02-13T06:03:20-08:00 Fix typo: it's "elif", not "else if" - - - - - 1 changed file: - bin/git-version.sh Changes: ===================================== bin/git-version.sh ===================================== @@ -1,12 +1,10 @@ #!/bin/sh -# If no, just print out the version. If yes, print out the version as -# a C file #define. - +# If FILE=yes, print out the version as a C file #define. Otherwise, +# just print the version to stdout and exit. FILE="" -while getopts "f" arg -do +while getopts "f" arg; do case $arg in f) FILE=yes ;; @@ -15,15 +13,12 @@ done # Script to determine the cmucl version based on git describe GIT_HASH="`(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]'` != 0 ]; then +if [ `expr "X$GIT_HASH" : 'Xsnapshot-[0-9][0-9][0-9][0-9]-[01][0-9]'` != 0 ]; 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]'` != 0 ]; then + DEFAULT_VERSION=`expr "$GIT_HASH" : "snapshot-\(.*\)"` +elif [ `expr "X$GIT_HASH" : 'X[0-9][0-9][a-f]'` != 0 ]; then # The git hash looks like a release which is 3 hex digits. Use it as is. DEFAULT_VERSION="${GIT_HASH}" fi View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5286ab0f32487ede8be26a1... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5286ab0f32487ede8be26a1... You're receiving this email because of your account on gitlab.common-lisp.net.