Skip to content

Commit

Permalink
Fixes to the new versioning system
Browse files Browse the repository at this point in the history
  • Loading branch information
alberthdev committed Apr 1, 2015
1 parent d48e713 commit 8703ae8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ clean:
version:
@./version.sh set
@echo "The current spasm-ng version is: $(VERSION)"
@test -n "$(GITREV)" && echo "$(GITREV)"
@test -n "$(GITREV)" && echo "$(GITREV)" || exit 0
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ On Windows, simply build with the included Visual Studio project file.

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

# Run this to update the version
# Git users: run this to update the version
# ONLY RUN THIS IF YOU ARE USING GIT
make version

# Now build!
Expand Down
4 changes: 2 additions & 2 deletions version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ getversion() {
if [ -d ".git" ]; then
test -z "$FORCE_NO_GIT" && which git 2>&1 >/dev/null
if [ "$?" = "0" ];then
git describe --exact-match --tags HEAD 2>/dev/null
git describe --exact-match --tags HEAD 2>/dev/null >/dev/null
if [ "$?" = "0" ];then
echo "$VERSION"
else
Expand All @@ -32,7 +32,7 @@ elif [ "$1" = "dpkg" ];then
getversion | sed -r 's/^.{1}//' | sed 's/[-]/~/' | sed 's/[.]git/+git/' | sed -e ':begin;s/[.]//2;t begin'
else
getversion
which git 2>&1 >/dev/null && git describe --exact-match --tags HEAD 2>/dev/null
which git 2>&1 >/dev/null && git describe --exact-match --tags HEAD 2>/dev/null >/dev/null
if [ ! "$?" = "0" ];then
test -z "$FORCE_NO_GIT" && echo "Git revision: "`git rev-parse --short HEAD`
fi
Expand Down

0 comments on commit 8703ae8

Please sign in to comment.