Skip to content

Instantly share code, notes, and snippets.

@valllllll2000
Created October 2, 2019 14:20
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 valllllll2000/a9e9a3bb8fd10fb3fb0fb1e0b81dc662 to your computer and use it in GitHub Desktop.
Save valllllll2000/a9e9a3bb8fd10fb3fb0fb1e0b81dc662 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
VERSION="$(cat app/version.properties | grep -o "VERSION_CODE=\+[0-9]\+" | cut -c 14-)"
VERSION_NEW=$((VERSION+1))
echo $VERSION_NEW
sed -i "s/\(VERSION_CODE=\).*\$/\1${VERSION_NEW}/" app/version.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment