blob: 2e52c80c058ba7713677e7becafce53b6e2fb3ad [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001Subject: [PATCH] iw: version.sh: don't use git describe for versioning
2
3It will detect top-level git repositories like the Angstrom setup-scripts and break.
4
5Upstream-Status: Pending
6
7Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05008Signed-off-by: Maxin B. John <maxin.john@intel.com>
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009---
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050010diff -Naur iw-4.3-origin/version.sh iw-4.3/version.sh
11--- iw-4.3-origin/version.sh 2015-11-20 16:37:58.762077162 +0200
12+++ iw-4.3/version.sh 2015-11-20 16:52:05.526491150 +0200
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013@@ -3,21 +3,7 @@
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050014 VERSION="4.3"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015 OUT="$1"
16
17-if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
18- git update-index --refresh --unmerged > /dev/null
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050019- descr=$(git describe --match=v*)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020-
21- # on git builds check that the version number above
22- # is correct...
23- [ "${descr%%-*}" = "v$VERSION" ] || exit 2
24-
25- v="${descr#v}"
26- if git diff-index --name-only HEAD | read dummy ; then
27- v="$v"-dirty
28- fi
29-else
30- v="$VERSION"
31-fi
32+v="$VERSION"
33
34 echo '#include "iw.h"' > "$OUT"
35 echo "const char iw_version[] = \"$v\";" >> "$OUT"