Skip to content

Instantly share code, notes, and snippets.

@mochadwi
Created April 23, 2019 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mochadwi/fb924aed7fbe9ecada44690a55f546bc to your computer and use it in GitHub Desktop.
Save mochadwi/fb924aed7fbe9ecada44690a55f546bc to your computer and use it in GitHub Desktop.
Crashlytics - config_release.sh
#!/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