You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
435 B
12 lines
435 B
#! /bin/bash |
|
|
|
MANIFEST_FILE=android/AndroidManifest.xml |
|
|
|
VERSIONCODE=`git rev-list master --first-parent --count` |
|
VERSIONNAME=`git describe --always --tags | sed -e 's/^v//'` |
|
|
|
echo "VersionCode: ${VERSIONCODE}" |
|
echo "VersionName: ${VERSIONNAME}" |
|
|
|
sed -i -e "s/android:versionCode=\"[0-9][0-9]*\"/android:versionCode=\"${VERSIONCODE}\"/" $MANIFEST_FILE |
|
sed -i -e 's/versionName *= *"[^"]*"/versionName="'$VERSIONNAME'"/' $MANIFEST_FILE
|
|
|