summaryrefslogtreecommitdiff
path: root/makesrcdist
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-08-12 19:58:32 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2024-08-26 20:02:42 +0200
commit9568d5bb737eb468e87fd43f21404e2def101e30 (patch)
tree37dccaef760e15fa48d7d49569570ed6f2b3f88a /makesrcdist
parent13f1911624359e8370c070981bb4b391b3caaae1 (diff)
Display Git revision in docs generated from releases (#499)
- makesrcdist: store Git revision in a file in the tarball - CMake/resources.cmake: get git revision either from Git or file and store it as CMake cache variable 'FLTK_GIT_REVISION' for reference - documentation/*: get git revision from git or file - fluid/documentation/*: get git revision from git or file
Diffstat (limited to 'makesrcdist')
-rwxr-xr-xmakesrcdist9
1 files changed, 9 insertions, 0 deletions
diff --git a/makesrcdist b/makesrcdist
index 26a35e68f..e9b7b66a9 100755
--- a/makesrcdist
+++ b/makesrcdist
@@ -52,6 +52,8 @@ SNAPSHOT='https://www.fltk.org/pub/fltk/snapshots'
DATE="`date +'%Y%m%d'`"
+GIT_REVISION=$(git rev-parse HEAD)
+
# VS = short version number ('major.minor'), for instance '1.4'.
# Note: VS is used only for snapshot generation
# fltk_version = full version number w/o 'rcN' (from file fltk_version.dat)
@@ -118,6 +120,13 @@ sed -e '1,$s/@VERSION@/'$version'/' \
-e '1,$s#^Source:.*#Source: '$fileurl'#' \
<fltk.spec.in >fltk.spec
+
+# Write git revision file with full git revision
+# which will be stored in the distribution tarball
+
+echo Writing git revision file...
+echo "$GIT_REVISION" > fltk_git_rev.dat
+
echo Creating configure script...
autoconf -f