Use proper branch instead of releaseChannel

This commit is contained in:
xmflsct 2022-08-18 00:21:46 +02:00
parent 3853066330
commit 244eda3d12
5 changed files with 13 additions and 10 deletions

View File

@ -172,7 +172,7 @@ android {
} }
manifestPlaceholders = [ manifestPlaceholders = [
runtimeVersion: project.hasProperty('runtimeVersion') ? project.property('runtimeVersion') : "", runtimeVersion: project.hasProperty('runtimeVersion') ? project.property('runtimeVersion') : "",
releaseChannel: project.hasProperty('releaseChannel') ? project.property('releaseChannel') : "default" branch: project.hasProperty('branch') ? project.property('branch') : "development"
] ]
} }
if (isNewArchitectureEnabled()) { if (isNewArchitectureEnabled()) {

View File

@ -15,7 +15,7 @@
<!-- [Custom] End Expo Notifications --> <!-- [Custom] End Expo Notifications -->
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/3288313f-3ff0-496a-a5a9-d8985e7cad5f"/> <meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/3288313f-3ff0-496a-a5a9-d8985e7cad5f"/>
<meta-data android:name="expo.modules.updates.EXPO_RUNTIME_VERSION" android:value="${runtimeVersion}"/> <meta-data android:name="expo.modules.updates.EXPO_RUNTIME_VERSION" android:value="${runtimeVersion}"/>
<meta-data android:name="expo.modules.updates.EXPO_RELEASE_CHANNEL" android:value="${releaseChannel}"/> <meta-data android:name="expo.modules.updates.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY" android:value="{'expo-channel-name':'${branch}'}"/>
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/> <meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="WIFI_ONLY"/> <meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="WIFI_ONLY"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/> <meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>

View File

@ -32,7 +32,7 @@ private_lane :build_ios do
DSYM_FILE = "#{BUILD_DIRECTORY}/tooot.app.dSYM.zip" DSYM_FILE = "#{BUILD_DIRECTORY}/tooot.app.dSYM.zip"
set_info_plist_value( path: EXPO_PLIST, key: "EXUpdatesRuntimeVersion", value: VERSION ) set_info_plist_value( path: EXPO_PLIST, key: "EXUpdatesRuntimeVersion", value: VERSION )
set_info_plist_value( path: EXPO_PLIST, key: "EXUpdatesReleaseChannel", value: ENVIRONMENT ) set_info_plist_value( path: EXPO_PLIST, key: "EXUpdatesRequestHeaders", subkey: "expo-channel-name", value: ENVIRONMENT )
setup_ci setup_ci
set_info_plist_value( path: INFO_PLIST, key: "CFBundleShortVersionString", value: VERSION ) set_info_plist_value( path: INFO_PLIST, key: "CFBundleShortVersionString", value: VERSION )
@ -98,7 +98,7 @@ private_lane :build_android do
print_command_output: true, print_command_output: true,
properties: { properties: {
"runtimeVersion" => VERSION, "runtimeVersion" => VERSION,
"releaseChannel" => ENVIRONMENT, "branch" => ENVIRONMENT,
"android.injected.signing.store.file" => "#{File.expand_path('..', Dir.pwd)}/android/tooot.jks", "android.injected.signing.store.file" => "#{File.expand_path('..', Dir.pwd)}/android/tooot.jks",
"android.injected.signing.store.password" => ENV["ANDROID_KEYSTORE_PASSWORD"], "android.injected.signing.store.password" => ENV["ANDROID_KEYSTORE_PASSWORD"],
"android.injected.signing.key.alias" => ENV["ANDROID_KEYSTORE_ALIAS"], "android.injected.signing.key.alias" => ENV["ANDROID_KEYSTORE_ALIAS"],
@ -137,7 +137,7 @@ private_lane :build_android_apk do
print_command_output: true, print_command_output: true,
properties: { properties: {
"runtimeVersion" => VERSION, "runtimeVersion" => VERSION,
"releaseChannel" => ENVIRONMENT, "branch" => ENVIRONMENT,
"android.injected.signing.store.file" => "#{File.expand_path('..', Dir.pwd)}/android/tooot.jks", "android.injected.signing.store.file" => "#{File.expand_path('..', Dir.pwd)}/android/tooot.jks",
"android.injected.signing.store.password" => ENV["ANDROID_KEYSTORE_PASSWORD"], "android.injected.signing.store.password" => ENV["ANDROID_KEYSTORE_PASSWORD"],
"android.injected.signing.key.alias" => ENV["ANDROID_KEYSTORE_ALIAS"], "android.injected.signing.key.alias" => ENV["ANDROID_KEYSTORE_ALIAS"],

View File

@ -8,8 +8,11 @@
<true/> <true/>
<key>EXUpdatesLaunchWaitMs</key> <key>EXUpdatesLaunchWaitMs</key>
<integer>0</integer> <integer>0</integer>
<key>EXUpdatesReleaseChannel</key> <key>EXUpdatesRequestHeaders</key>
<string>development</string> <dict>
<key>expo-channel-name</key>
<string>development</string>
</dict>
<key>EXUpdatesRuntimeVersion</key> <key>EXUpdatesRuntimeVersion</key>
<string>0</string> <string>0</string>
<key>EXUpdatesURL</key> <key>EXUpdatesURL</key>

View File

@ -36,14 +36,14 @@ const mapEnvironment = <T = unknown>({
const isDevelopment = const isDevelopment =
__DEV__ || __DEV__ ||
['development'].some(channel => (Updates.channel || Updates.releaseChannel) === channel) ['development'].some(channel => (Updates.channel) === channel)
const isCandidate = ['candidate'].some(channel => const isCandidate = ['candidate'].some(channel =>
(Updates.channel || Updates.releaseChannel) === channel (Updates.channel) === channel
) )
const isRelease = ['release'].some(channel => const isRelease = ['release'].some(channel =>
(Updates.channel || Updates.releaseChannel) === channel (Updates.channel) === channel
) )
export { mapEnvironment, isDevelopment, isCandidate, isRelease } export { mapEnvironment, isDevelopment, isCandidate, isRelease }