From 52a60b37e28a17cc08407fbccf3f0da595c1b17e Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Fri, 29 Jun 2012 12:43:09 +0000 Subject: [PATCH] handle core versions without the 3rd digit --- scripts/setversion.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/setversion.sh b/scripts/setversion.sh index cfad5783a..d24c4cc48 100755 --- a/scripts/setversion.sh +++ b/scripts/setversion.sh @@ -14,6 +14,7 @@ CORE=`grep 'public final static String VERSION' $I2PBASE/core/java/src/net/i2p/C MAJOR=`echo $CORE | cut -d '.' -f 1` MINOR=`echo $CORE | cut -d '.' -f 2` RELEASE=`echo $CORE | cut -d '.' -f 3` +RELEASE=${RELEASE:-0} ROUTERBUILD=$((`grep 'public final static long BUILD' $I2PBASE/router/java/src/net/i2p/router/RouterVersion.java | \ cut -d '=' -f 2 | \ @@ -26,7 +27,7 @@ SDK=`grep 'android:minSdkVersion' $MANIFEST | \ cut -d '"' -f 2` # don't let build number get too long -VERSIONSTRING="${CORE}-${ROUTERBUILD}_b$(($ANDROIDBUILD % 512))-API$SDK" +VERSIONSTRING="${MAJOR}.${MINOR}.${RELEASE}-${ROUTERBUILD}_b$(($ANDROIDBUILD % 512))-API$SDK" # # Android version code is an integer. -- GitLab