Last active
August 29, 2015 14:01
-
-
Save alabeduarte/bcda31f1f8fdf68002d7 to your computer and use it in GitHub Desktop.
Versioning android app with maven based on the latest git tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -exu | |
TAG_COUNT=$(git tag | wc -l | grep -o '[0-9]\+') | |
CURRENT_TAG=$(git describe --abbrev=0 --tags | grep -o '[0-9\.]\+') | |
mvn versions:set -DnewVersion=$CURRENT_TAG -DgenerateBackupPoms=false | |
mvn clean package -Prelease -Dproject.version=$CURRENT_TAG -Dproject.versionCode=$TAG_COUNT -Dsign.keystore=$KEY_STORE_PATH -Dsign.alias=${PROJECT_NAME} -Dsign.storepass= -Dsign.keypass=${PROJECT_PASSWORD} | |
jarsigner -verbose -verify -certs app/target/app-signed-aligned.apk > jarsigner.verify.certs.verbose.output.txt | |
echo $(aapt dump badging app/target/app.apk | grep version) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment