Skip to content

Commit 35c5948

Browse files
committed
Read version number from build.gradle
1 parent 64e0af3 commit 35c5948

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

library/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
minSdkVersion 10
99
targetSdkVersion 22
1010
versionCode 1
11-
versionName "0.0.1"
11+
versionName "0.1.0"
1212
}
1313
buildTypes {
1414
release {

release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ fi
2323
# VALIDATE CLIENT VERSIONS #
2424
##############################
2525

26-
VERSION=$(grep version pom.xml |head -2|tail -1|awk -F '>' '{print $2}'|awk -F '<' '{print $1}'|awk -F '-' '{print $1}')
26+
#VERSION=$(grep version pom.xml |head -2|tail -1|awk -F '>' '{print $2}'|awk -F '<' '{print $1}'|awk -F '-' '{print $1}')
27+
VERSION=$(grep versionName library/build.gradle | awk '{print $2}' | awk '{split($0, a, "\"")}{print a[2]}')
2728
read -p "We are releasing $VERSION, is this correct? (press enter to continue) " DERP
2829
if [[ ! -z $DERP ]]; then
2930
echo "Cancelling release, please update pom.xml to desired version"

0 commit comments

Comments
 (0)