Last active
January 17, 2021 18:28
-
-
Save victorbnl/cffc1a1b9e646faa5c790268ab3cf174 to your computer and use it in GitHub Desktop.
Pre-commit hook to increase build.gradle version
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 | |
# Increment versionCode | |
perl -pi -e 's/versionCode ([0-9]+)/"versionCode " . ($1+1)/e' ./app/build.gradle | |
# Increment versionName | |
perl -pi -e 's/versionName \"([0-9]+)\"/"versionName \"" . ($1+1) . "\""/e' ./app/build.gradle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment