summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8f2c7cd)
This should hopefully make it less confusing when building from the git
repository. Previously, when doing so the version number would always
be that of the last official release.
###############################################################################
###############################################################################
-AC_INIT([wimlib], [1.13.5-BETA1], [https://wimlib.net/forums/])
+AC_INIT([wimlib], m4_esyscmd([tools/get-version-number]),
+ [https://wimlib.net/forums/])
AC_CONFIG_SRCDIR([src/wim.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([src/wim.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
--- /dev/null
+#!/bin/sh
+
+# Get the version number of the project to use in the release filenames
+# and in the --version output.
+
+vers=$(git describe --abbrev=8 --dirty --always 2>/dev/null | \
+ sed 's/^v//')
+if [ -z "$vers" ]; then
+ # Fallback for people who use autoreconf on tarball releases
+ vers="1.13.4"
+fi
+echo "$vers"
export CFLAGS="-O2 -Wall -Werror"
export CFLAGS="-O2 -Wall -Werror"
+autoreconf -i -f # make sure the version number gets updated
+
./configure && $MAKE distcheck
# Recompress with 7-Zip
./configure && $MAKE distcheck
# Recompress with 7-Zip
-VERSION=$(grep 'AC_INIT' configure.ac | \
- grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+[^]]*')
+VERSION=$(tools/get-version-number)
DESTDIR=wimlib-${VERSION}-windows-${ARCH}-bin
ZIPFILE=wimlib-${VERSION}-windows-${ARCH}-bin.zip
MAKE="make -j $(grep -c processor /proc/cpuinfo)"
DESTDIR=wimlib-${VERSION}-windows-${ARCH}-bin
ZIPFILE=wimlib-${VERSION}-windows-${ARCH}-bin.zip
MAKE="make -j $(grep -c processor /proc/cpuinfo)"
pat='This is wimlib version [^[:space:]]\+ ([^[:space:]]\+ [^[:space:]]\+)'
sed -i "s/$pat/This is wimlib version $newver ($newmonth $newyear)/" README
pat='This is wimlib version [^[:space:]]\+ ([^[:space:]]\+ [^[:space:]]\+)'
sed -i "s/$pat/This is wimlib version $newver ($newmonth $newyear)/" README
-sed -i "s/$oldver/$newver/" configure.ac
+sed -i "s/$oldver/$newver/" tools/get-version-number
sed -i -e 's/\(#define WIMLIB_MAJOR_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'$newmajor'/' \
-e 's/\(#define WIMLIB_MINOR_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'$newminor'/' \
sed -i -e 's/\(#define WIMLIB_MAJOR_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'$newmajor'/' \
-e 's/\(#define WIMLIB_MINOR_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'$newminor'/' \