about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-02-21 13:54:31 -0800
committerGitHub <noreply@github.com>2024-02-21 13:54:31 -0800
commit874489b40227b2ce302e6be840e536e82847842f (patch)
tree8f4bcecf23a700b2ccd304c79049a90488a88e30 /scripts
parentba71e4b45991673977003cdee33a823e1d9419bb (diff)
downloadvoidsky-874489b40227b2ce302e6be840e536e82847842f.tar.zst
Use EAS managed build number, run build/submit on GH Actions (#2841)
* use eas version code

* test

* try sync

* try sync

* use eas to manage the version code

* apply build numbers to dist

* test script

* set this to production or now

* revert to schedule

* testing on 1.69

* autosubmit

* autosubmit, remove cheat

* finished!!!!!

try again

try again

try again

try again

add same for android

maybe now

omg wow i messed that up?

once again

once again

again

error?

add caching

add caching

try again again again again

try again again again

try again again

try again

try this a different way

another test

testing this again

* hack

* write environment variables

* ready to go

* final test

* Revert "final test"

This reverts commit 6580c5c0974db25a3704b683673c41471a6ad0cf.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bumpAndroidBuildNumber.sh10
-rwxr-xr-xscripts/bumpIosBuildNumber.sh10
-rwxr-xr-xscripts/useBuildNumberEnv.sh11
3 files changed, 11 insertions, 20 deletions
diff --git a/scripts/bumpAndroidBuildNumber.sh b/scripts/bumpAndroidBuildNumber.sh
deleted file mode 100755
index 105f1296d..000000000
--- a/scripts/bumpAndroidBuildNumber.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# The number here should always be the line number the iOS build variable is on
-line=$(sed "30q;d" ./app.config.js)
-currentBuildNumber=$(echo "$line" | grep -oE '[0-9]+([.][0-9]+)?')
-newBuildNumber=$((currentBuildNumber+1))
-newBuildVariable="const ANDROID_VERSION_CODE = '$newBuildNumber'"
-sed -i.bak "30s/.*/  $newBuildVariable/" ./app.config.js
-rm -rf ./app.config.js.bak
-
-echo "Android build number bumped to $newBuildNumber"
diff --git a/scripts/bumpIosBuildNumber.sh b/scripts/bumpIosBuildNumber.sh
deleted file mode 100755
index b78d2e69d..000000000
--- a/scripts/bumpIosBuildNumber.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# The number here should always be the line number the iOS build variable is on
-line=$(sed "24q;d" ./app.config.js)
-currentBuildNumber=$(echo "$line" | grep -oE '[0-9]+([.][0-9]+)?')
-newBuildNumber=$((currentBuildNumber+1))
-newBuildVariable="const IOS_BUILD_NUMBER = '$newBuildNumber'"
-sed -i.bak "24s/.*/  $newBuildVariable/" ./app.config.js
-rm -rf ./app.config.js.bak
-
-echo "iOS build number bumped to $newBuildNumber"
diff --git a/scripts/useBuildNumberEnv.sh b/scripts/useBuildNumberEnv.sh
new file mode 100755
index 000000000..fe273d394
--- /dev/null
+++ b/scripts/useBuildNumberEnv.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+outputIos=$(eas build:version:get -p ios)
+outputAndroid=$(eas build:version:get -p android)
+currentIosVersion=${outputIos#*buildNumber - }
+currentAndroidVersion=${outputAndroid#*versionCode - }
+
+BSKY_IOS_BUILD_NUMBER=$((currentIosVersion+1))
+BSKY_ANDROID_VERSION_CODE=$((currentAndroidVersion+1))
+
+bash -c "BSKY_IOS_BUILD_NUMBER=$BSKY_IOS_BUILD_NUMBER BSKY_ANDROID_VERSION_CODE=$BSKY_ANDROID_VERSION_CODE $*"
+