Remove deploy.sh from .gitignore and add deploy.sh

Not sure why I had this ignored to begin with.
This commit is contained in:
Brandon Presley 2022-09-04 17:05:44 +12:00
parent 91d0cbaed8
commit c978e4b7f1
2 changed files with 16 additions and 1 deletions

1
.gitignore vendored
View File

@ -62,7 +62,6 @@ buck-out/
/ios/Pods/
/vendor/bundle/
deploy.sh
README.pdf
build

16
deploy.sh Executable file
View File

@ -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 ..