summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTarun Nainani <tnainani@codeaurora.org>2015-03-24 13:16:29 -0700
committerWebTech Code Review <code-review@localhost>2015-03-25 11:48:55 -0700
commit5229d6a27be9ac8a704a49ba65d0500104cd4ccb (patch)
treee9aa1925d725e9457be095c6cf466edc879e491d /tools
parente23050271f10e77f93581b2ffe0311a1aaaf4753 (diff)
downloadandroid_packages_apps_Gello-5229d6a27be9ac8a704a49ba65d0500104cd4ccb.tar.gz
android_packages_apps_Gello-5229d6a27be9ac8a704a49ba65d0500104cd4ccb.tar.bz2
android_packages_apps_Gello-5229d6a27be9ac8a704a49ba65d0500104cd4ccb.zip
Change package name to 'org.codeaurora.swe.browser.beta'
-Add new icon 'ic_launcher_browser_swe_beta'. -Change versioning scheme to "%04d%04d" where first number is branch number and later is buildid/patch number. Previously scheme was "%d%02d%06d%05d" which was generating very large number which when converted to int via aapt was getting into overflow situation due to which random version code string was generated. Change-Id: Ib63d1490fee6124a64c3f73bd75ab9e45912ef9b
Diffstat (limited to 'tools')
-rwxr-xr-xtools/generate_about.sh40
1 files changed, 12 insertions, 28 deletions
diff --git a/tools/generate_about.sh b/tools/generate_about.sh
index 9e04e95f..185ce116 100755
--- a/tools/generate_about.sh
+++ b/tools/generate_about.sh
@@ -74,12 +74,16 @@ function error()
exit ${retval}
}
+VERSIONINFO=$(cat ${VERSIONFILE}) || error 1 "couldn't read \"${VERSIONFILE}\""
+VERSIONINFO=( ${VERSIONINFO//;/ } )
-BASEVERSION=$(cat ${VERSIONFILE}) || error 1 "couldn't read \"${VERSIONFILE}\""
-BASEVERSION=( ${BASEVERSION//./ } )
-MAJOR=${BASEVERSION[0]}
-MINOR=${BASEVERSION[1]}
-BRANCH=unknown
+BASE_STRING=( ${VERSIONINFO[0]//=/ } )
+BASE_STRING=( ${BASE_STRING[1]//./ } )
+MAJOR=${BASE_STRING[0]}
+MINOR=${BASE_STRING[1]}
+
+BRANCH=( ${VERSIONINFO[1]//=/ } )
+BRANCH=${BRANCH[1]}
BUILDID=unknown
VERSION=${MAJOR}.${MINOR}
@@ -102,26 +106,6 @@ do
fi
# collect branch and clean it up
- BRANCH=$(git branch | awk '/^\*/')
- BRANCH=${BRANCH#\* }
-
- # try to get the best form of the branch, to
- # catch detached HEADs, etc.
- while read
- do
- REPLY=${REPLY// /}
- [[ ${REPLY:0:1} == "(" ]] && continue
- REPLY=${REPLY%->*}
- git log -1 --oneline ${REPLY} | grep "${HASH}" &>/dev/null && BRANCH=${REPLY} && break;
- done < <(git branch -a | grep -Ev "\*" 2>/dev/null)
-
- if [[ ${BRANCH//(/} == ${BRANCH} ]]
- then
- # trim branch to a num, or a smaller name
- BRANCH=${BRANCH##*/}
- fi
- #SWE-FIXME
- BRANCH=2125
# tack on branch
VERSION=${VERSION}.${BRANCH}
@@ -132,8 +116,6 @@ do
if [[ -n ${MERGE_BASE} ]]
then
BUILDID=$(git log --oneline ${MERGE_BASE}.. | wc -l)
- #SWE-FIXME
- BUILDID=1200
VERSION=${VERSION}.${BUILDID}
else
warning "using version ${VERSION}.. merge-base:\"${MERGE_BASE}\" branch: \"${BRANCH}\""
@@ -175,6 +157,8 @@ fi
[[ -n ${BRANCH//[0-9]/} ]] && BRANCH=0
[[ -n ${BUILDID//[0-9]/} ]] && BUILDID=0
-(( ${CODE} )) && printf "%d%02d%06d%05d\n" $((${MAJOR})) $((${MINOR})) $((${BRANCH})) $((${BUILDID}))
+# This value should always be less than MAX int value "2147483647"
+(( ${CODE} )) && printf "%4d%04d\n" $((${BRANCH})) $((${BUILDID}))
+
exit 0