mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
eadebdd35d
Use a single script to generate the version number from git. This script * strips the v from the start of the "git describe" output * changes all "-" occurences to "." * does NOT create a properly sortable version number from "2.1-rc2" type "git describe" output * does NOT generate a "proper" "1.2.3" type version number under any circumstances * will generate "2.1" in case the "git describe" output is "2.1" These policy might need closer adaption to awesome's tagging habit some time. In dist tarballs, ship a "version-stamp" file with the package version in it. If the "version-stamp" file is present (i.e. if it is a source tree from a dist tarball), no git checks will be performed. Concept from autoconf, but code written from scratch to match awesome's requirements. Signed-off-by: Julien Danjou <julien@danjou.info>
32 lines
916 B
Bash
Executable file
32 lines
916 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Change to source tree
|
|
srcdir=`dirname "$0"`
|
|
[ -z "$srcdir" ] || cd "$srcdir"
|
|
|
|
# sed program
|
|
SED=${SED-sed}
|
|
|
|
# Check whether the version needs to be updated from VCS/version-stamp
|
|
if [ -d ".git" ] && [ -d "autom4te.cache" ]; then
|
|
git_describe=`./build-utils/package-version . version-stamp`
|
|
for f in autom4te.cache/output.*; do
|
|
[ -f "$f" ] || continue
|
|
pkg_ver=`${SED} -n "s/^PACKAGE_VERSION='\(.*\)'\$/\1/p" "$f"`
|
|
if [ "x$pkg_ver" = "x$git_describe" ]
|
|
then :
|
|
else
|
|
echo "Cleaning out autom4te.cache (${pkg_ver} -> ${git_describe})"
|
|
rm -rf "autom4te.cache"
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
|
|
echo "Generating configure files... may take a while."
|
|
|
|
autoreconf --install --force && \
|
|
echo "Preparing was successful if there was no error messages above." && \
|
|
echo "Now type:" && \
|
|
echo " ./configure && make" && \
|
|
echo "Run './configure --help' for more information"
|