From 40f03fb663090c2387db8d0a349d0301e1aea8ce Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Sat, 31 Aug 2024 19:25:42 +0300 Subject: [PATCH] Allow building from git-archive --- .git-archive-version | 1 + .gitattributes | 1 + generate-version.sh | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 .git-archive-version diff --git a/.git-archive-version b/.git-archive-version new file mode 100644 index 000000000..f4034a5d2 --- /dev/null +++ b/.git-archive-version @@ -0,0 +1 @@ +$Format:%(describe)$ diff --git a/.gitattributes b/.gitattributes index fcadb2cf9..ff7dbbf26 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ * text eol=lf +.git-archive-version export-subst diff --git a/generate-version.sh b/generate-version.sh index 6d1fe9996..52e4d6917 100755 --- a/generate-version.sh +++ b/generate-version.sh @@ -18,6 +18,18 @@ then exit 0 elif [ -z "$AVAILABLE" ] then + if grep -q "sbcl-" .git-archive-version > /dev/null 2>&1 + then + cat >version.lisp-expr <> version.lisp-expr + exit 0 + fi + echo "Can't 'git describe' SBCL source and version.lisp-expr is missing." >&2 echo "To fix this, either install git or create a fake version.lisp-expr file." >&2 echo "You can create a fake version.lisp-expr file like this:" >&2