Added branch name to non-release dist tarballs
authorAri Johnson <ari@cobramush.org>
Fri, 2 Mar 2007 16:36:17 +0000 (16:36 +0000)
committerAri Johnson <ari@cobramush.org>
Fri, 2 Mar 2007 16:36:17 +0000 (16:36 +0000)
scripts/makedist.sh

index 97957cfa8c908d29af3a9f0eed59629ce3d927d6..e0a7553d43b2d0f91dbd05b2bbad6f3a4e2a220f 100644 (file)
@@ -12,7 +12,8 @@ echo "that all files are up-to-date"
 # Step 2: determine version
 echo "Determining version..."
 VERSION=`grep VERSION hdrs/version.h | sed 's/^.*"\(.*\)".*$/\1/'`
-echo "Version is $VERSION"
+BRANCH=`grep VBRANCH hdrs/version.h | sed 's/^.*"\(.*\)".*$/\1/'`
+echo "Version is $VERSION, branch is $BRANCH"
 
 # Step 3: copy everything into a temporary directory
 WD=`pwd`
@@ -30,7 +31,12 @@ rm x??
 
 # Step 4: make tarball
 echo "Making tarball..."
-TARBALL="cobramush-$VERSION.tar.gz"
+if [ "$BRANCH" = "release" ]; then
+    BRANCHNAME=""
+else
+    BRANCHNAME="-$BRANCH"
+fi
+TARBALL="cobramush-$VERSION$BRANCHNAME.tar.gz"
 tar -czf "$WD/$TARBALL" cobramush
 
 # Step 5: clean up