Skip to content

Commit 8703ae8

Browse files
committed
Fixes to the new versioning system
1 parent d48e713 commit 8703ae8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ clean:
7777
version:
7878
@./version.sh set
7979
@echo "The current spasm-ng version is: $(VERSION)"
80-
@test -n "$(GITREV)" && echo "$(GITREV)"
80+
@test -n "$(GITREV)" && echo "$(GITREV)" || exit 0

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ On Windows, simply build with the included Visual Studio project file.
4343

4444
On Linux, Mac OS X, and other \*nix, simply build by running:
4545

46-
# Run this to update the version
46+
# Git users: run this to update the version
47+
# ONLY RUN THIS IF YOU ARE USING GIT
4748
make version
4849

4950
# Now build!

version.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ getversion() {
88
if [ -d ".git" ]; then
99
test -z "$FORCE_NO_GIT" && which git 2>&1 >/dev/null
1010
if [ "$?" = "0" ];then
11-
git describe --exact-match --tags HEAD 2>/dev/null
11+
git describe --exact-match --tags HEAD 2>/dev/null >/dev/null
1212
if [ "$?" = "0" ];then
1313
echo "$VERSION"
1414
else
@@ -32,7 +32,7 @@ elif [ "$1" = "dpkg" ];then
3232
getversion | sed -r 's/^.{1}//' | sed 's/[-]/~/' | sed 's/[.]git/+git/' | sed -e ':begin;s/[.]//2;t begin'
3333
else
3434
getversion
35-
which git 2>&1 >/dev/null && git describe --exact-match --tags HEAD 2>/dev/null
35+
which git 2>&1 >/dev/null && git describe --exact-match --tags HEAD 2>/dev/null >/dev/null
3636
if [ ! "$?" = "0" ];then
3737
test -z "$FORCE_NO_GIT" && echo "Git revision: "`git rev-parse --short HEAD`
3838
fi

0 commit comments

Comments
 (0)