From c978e4b7f1275ddcfb0e2233d3cb8220db5d885f Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Sun, 4 Sep 2022 17:05:44 +1200 Subject: [PATCH] Remove deploy.sh from .gitignore and add deploy.sh Not sure why I had this ignored to begin with. --- .gitignore | 1 - deploy.sh | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 deploy.sh diff --git a/.gitignore b/.gitignore index 2b68218..486cc89 100644 --- a/.gitignore +++ b/.gitignore @@ -62,7 +62,6 @@ buck-out/ /ios/Pods/ /vendor/bundle/ -deploy.sh README.pdf build diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..012c595 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -ex +yarn tsc && yarn lint +git push origin HEAD > /dev/null & +cd android || exit 1 +target=app/build.gradle +newVersion=$(grep '^\s*versionCode [0-9]*$' "$target" | awk '{print $2+1}') +sed -i "s/\(^\s*\)versionCode [0-9]*$/\1versionCode $newVersion/" \ + "$target" +[ "$1" != "--nobundle" ] && ./gradlew bundleRelease +git add app/build.gradle +git commit -m "Set versionCode=$newVersion" +git tag "$newVersion" +git push origin HEAD & git push --tags +cd ..