threads / patch / 19929

patchmake_jgit.sh: do not fail with untagged repository

Subject: [JGIT PATCH] make_jgit.sh: do not fail with untagged repository

## tl;dr

One message between Jun 25, 2009 and Jun 25, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Johannes Schindelin· Jun 25, 2009, 15:40 UTC · lore

With a repository lacking tags, make_jgit.sh would produce an invalid jgit.jar. So use the fake tag "untagged" in that case.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 make_jgit.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to make_jgit.sh +1 −1
diff --git a/make_jgit.sh b/make_jgit.sh
index 2969e6e..027a074 100755
--- a/make_jgit.sh
+++ b/make_jgit.sh
@@ -56,7 +56,7 @@ if [ -n "`git diff-index --name-only HEAD --`" ]
 then
 	VN="$VN-dirty"
 fi
-VN=`echo "$VN" | sed -e s/-/./g`
+VN=${VN:-untagged}`echo "$VN" | sed -e s/-/./g`
 
 CLASSPATH=
 for j in $JARS
-- 
1.6.3.284.g6fecc

← back to recent threads