Raymond Toy pushed to branch issue-363-add-version-number at cmucl / cmucl Commits: 659b14d6 by Raymond Toy at 2025-01-05T19:27:30-08:00 Use cmucl-version.sh to get the version Previously, we just implemented the code to extract the version in each file as needed. This, of course, is bad. Use the script `cmucl-version.sh` to get the version so that all the various places agree on the version. - - - - - 3 changed files: - bin/build.sh - bin/make-dist.sh - src/lisp/GNUmakefile Changes: ===================================== bin/build.sh ===================================== @@ -49,17 +49,7 @@ GIT_FILE_COMMENT="yes" export GIT_FILE_COMMENT SKIPUTILS=no -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 - DEFAULT_VERSION=`expr "${GIT_HASH}" : "snapshot-\(.*\)"` -fi - -if expr "X${GIT_HASH}" : 'X[0-9][0-9][a-f]' > /dev/null; then - DEFAULT_VERSION="${GIT_HASH}" -fi - +DEFAULT_VERSION="`bin/cmucl-version.sh`" export DEFAULT_VERISON # If gmake exists, assume it is GNU make and use it. ===================================== bin/make-dist.sh ===================================== @@ -97,17 +97,7 @@ def_arch_os # Choose a version based on the git hash as the default version. We # only compute a default if the git hash looks like a snapshot # ("snapshot-yyyy-mm") or a release number.. -GIT_HASH="`(cd src; git describe --dirty 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 - DEFAULT_VERSION=`expr "${GIT_HASH}" : "snapshot-\(.*\)"` -fi - -if expr "X${GIT_HASH}" : 'X[0-9][0-9][a-f]' > /dev/null; then - DEFAULT_VERSION="${GIT_HASH}" -fi +DEFAULT_VERSION="`bin/cmucl-version.sh`" # Default compression is -J (xz). These variables are passed to the # other scripts via the environmen, so export them. ===================================== src/lisp/GNUmakefile ===================================== @@ -41,8 +41,7 @@ OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS)))) ### Don't look in RCS for the files, because we might not want the latest. %: RCS/%,v -GIT_HASH = $(shell git describe --dirty) -DEFAULT_VERSION = $(subst snapshot-,,${GIT_HASH}) +DEFAULT_VERSION = $(shell ../../bin/cmucl-version.sh) lisp.nm: lisp lisp.a echo 'Map file for lisp version ' `cat version` > ,lisp.nm View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/659b14d6e400659672e81ca8... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/659b14d6e400659672e81ca8... You're receiving this email because of your account on gitlab.common-lisp.net.