apply build numbers to dist

This commit is contained in:
Hailey
2024-02-12 14:46:57 -08:00
parent 866f6af1fe
commit 882f7ec4ea
2 changed files with 18 additions and 2 deletions
+7 -2
View File
@@ -11,7 +11,7 @@ const DARK_SPLASH_CONFIG = {
resizeMode: 'cover',
}
module.exports = function (config) {
module.exports = function () {
/**
* App version number. Should be incremented as part of a release cycle.
*/
@@ -24,6 +24,11 @@ module.exports = function (config) {
*/
const PLATFORM = process.env.EAS_BUILD_PLATFORM
const DIST_BUILD_NUMBER =
PLATFORM === 'android'
? process.env.BSKY_ANDROID_VERSION_CODE
: process.env.BSKY_IOS_BUILD_NUMBER
return {
expo: {
version: VERSION,
@@ -149,7 +154,7 @@ module.exports = function (config) {
organization: 'blueskyweb',
project: 'react-native',
release: VERSION,
dist: `${PLATFORM}.${VERSION}.${new Date().toISOString()}`,
dist: `${PLATFORM}.${VERSION}.${DIST_BUILD_NUMBER}`,
},
},
],
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
echo "$@"
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 eas build -p ios --profile production"