Created
April 23, 2019 12:39
-
-
Save mochadwi/fb924aed7fbe9ecada44690a55f546bc to your computer and use it in GitHub Desktop.
Crashlytics - config_release.sh
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/sh | |
releasenotes="app/release-notes.txt" | |
ls -al | |
cat $releasenotes | |
if [ -f "$releasenotes" ] | |
then | |
echo "$releasenotes found." | |
echo "deleting $releasenotes..." | |
rm $releasenotes | |
echo "$releasenotes deleted successfully!" | |
else | |
echo "$releasenotes not found." | |
echo "Create new $releasenotes..." | |
touch $releasenotes | |
echo "$releasenotes created!" | |
fi | |
echo "Update patch version" | |
./gradlew bumperVersionPatch | |
./gradlew bumperVersionPatch | |
./gradlew bumperVersionPatch | |
./gradlew bumperVersionPatch | |
./gradlew bumperVersionPatch | |
echo "Done." | |
echo "Get the previous 3rd from latest commit on this branch, and write to the files also add to staged then commit" | |
git log --skip 3 -n 1 --pretty=%B > $releasenotes | |
git add $releasenotes app/gradle.properties app/version.properties | |
git commit -m "$(git log --skip 3 -n 1 --pretty=%B)" | |
echo "Done." | |
# Why the 3rd commit? merging on gitlab will create another commit unless using rebase, but for tutorial purpose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment