diff --git a/packages/flagship/android/fastlane/Fastfile b/packages/flagship/android/fastlane/Fastfile index e20f1db23c..45a2fe64cd 100644 --- a/packages/flagship/android/fastlane/Fastfile +++ b/packages/flagship/android/fastlane/Fastfile @@ -17,7 +17,7 @@ lane :appcenter do gradle(task: "assembleRelease") appcenter_upload( - api_token: "INJECTED_FROM_CONFIG", #PROJECT_MODIFY_FLAG_appcenter_api_token + #PROJECT_MODIFY_FLAG_appcenter_api_token owner_name: "INJECTED_FROM_CONFIG", #PROJECT_MODIFY_FLAG_appcenter_owner_name app_name: "INJECTED_FROM_CONFIG" #PROJECT_MODIFY_FLAG_appcenter_app_name_android ) diff --git a/packages/flagship/ios/fastlane/Fastfile b/packages/flagship/ios/fastlane/Fastfile index 5837c2431a..9ffef51117 100644 --- a/packages/flagship/ios/fastlane/Fastfile +++ b/packages/flagship/ios/fastlane/Fastfile @@ -39,7 +39,7 @@ lane :appcenter do ) appcenter_upload( - api_token: "INJECTED_FROM_CONFIG", #PROJECT_MODIFY_FLAG_appcenter_api_token + #PROJECT_MODIFY_FLAG_appcenter_api_token owner_name: "INJECTED_FROM_CONFIG", #PROJECT_MODIFY_FLAG_appcenter_owner_name app_name: "INJECTED_FROM_CONFIG" #PROJECT_MODIFY_FLAG_appcenter_app_name_ios ) diff --git a/packages/flagship/src/lib/fastlane.ts b/packages/flagship/src/lib/fastlane.ts index 9e6a1ffbaf..c0af574f57 100644 --- a/packages/flagship/src/lib/fastlane.ts +++ b/packages/flagship/src/lib/fastlane.ts @@ -1,6 +1,6 @@ import { Config } from '../types'; import * as fs from './fs'; -import { logInfo } from '../helpers'; +import { logInfo, logWarn } from '../helpers'; /** * Configures the project Fastfile from the project configuration. @@ -67,11 +67,18 @@ export function configure(path: string, configuration: Config): void { if (configuration && configuration.appCenter) { const { apiToken, organization, distribute } = configuration.appCenter; - fs.update( - path, - /.+#PROJECT_MODIFY_FLAG_appcenter_api_token/g, - `api_token: "${apiToken}", #PROJECT_MODIFY_FLAG_appcenter_api_token` - ); + if (apiToken) { + logWarn( + 'appCenter.apiToken is deprecated and will be removed in a future release;' + + ' use APPCENTER_API_TOKEN environment variable instead' + ); + + fs.update( + path, + /.+#PROJECT_MODIFY_FLAG_appcenter_api_token/g, + `api_token: "${apiToken}", #PROJECT_MODIFY_FLAG_appcenter_api_token` + ); + } fs.update( path, diff --git a/packages/flagship/src/types.ts b/packages/flagship/src/types.ts index a3f0875a51..8a3b6716b1 100644 --- a/packages/flagship/src/types.ts +++ b/packages/flagship/src/types.ts @@ -24,7 +24,7 @@ export interface Config { }; appCenter?: { - apiToken: string; + apiToken?: string; // deprecated; will be removed in a future release organization: string; distribute?: { appNameIOS?: string;