From 13e04d14bc330e9e969f6c13c256e7008a8b528d Mon Sep 17 00:00:00 2001 From: Szymon Dziedzic Date: Mon, 10 Feb 2025 10:22:31 +0100 Subject: [PATCH] [build-tools] replace EAS Secrets with EAS environment variables in error messages (#510) --- .../build-tools/src/buildErrors/userErrorHandlers.ts | 12 ++++++------ packages/build-tools/src/common/setup.ts | 2 +- packages/build-tools/src/steps/utils/expoUpdates.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/build-tools/src/buildErrors/userErrorHandlers.ts b/packages/build-tools/src/buildErrors/userErrorHandlers.ts index ca3dd87e..cd7d90d2 100644 --- a/packages/build-tools/src/buildErrors/userErrorHandlers.ts +++ b/packages/build-tools/src/buildErrors/userErrorHandlers.ts @@ -69,8 +69,8 @@ export const userErrorHandlers: ErrorHandler[] = [ createError: () => new UserFacingError( 'EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR', - '"google-services.json" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS secrets to provide EAS Build with the file.', - 'https://docs.expo.dev/build-reference/variables/#how-to-upload-a-secret-file-and' + '"google-services.json" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS environment variables to provide EAS Build with the file.', + 'https://docs.expo.dev/eas/environment-variables/#file-environment-variables' ), }, { @@ -84,8 +84,8 @@ export const userErrorHandlers: ErrorHandler[] = [ createError: () => new UserFacingError( 'EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR', - '"google-services.json" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS secrets to provide EAS Build with the file.', - 'https://docs.expo.dev/build-reference/variables/#how-to-upload-a-secret-file-and' + '"google-services.json" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS environment variables to provide EAS Build with the file.', + 'https://docs.expo.dev/eas/environment-variables/#file-environment-variables' ), }, { @@ -97,8 +97,8 @@ export const userErrorHandlers: ErrorHandler[] = [ createError: () => new UserFacingError( 'EAS_BUILD_MISSING_GOOGLE_SERVICES_PLIST_ERROR', - '"GoogleService-Info.plist" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS secrets to provide EAS Build with the file.', - 'https://docs.expo.dev/build-reference/variables/#how-to-upload-a-secret-file-and' + '"GoogleService-Info.plist" is missing, make sure that the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS environment variables to provide EAS Build with the file.', + 'https://docs.expo.dev/eas/environment-variables/#file-environment-variables' ), }, { diff --git a/packages/build-tools/src/common/setup.ts b/packages/build-tools/src/common/setup.ts index b71b127b..19b4769d 100644 --- a/packages/build-tools/src/common/setup.ts +++ b/packages/build-tools/src/common/setup.ts @@ -227,7 +227,7 @@ async function validateAppConfigAsync( extraMessage = 'Make sure you connected your GitHub repository to the correct Expo project. '; } else if (isUsingDynamicConfig) { extraMessage = - 'If you are using environment variables to switch between projects in app.config.js/app.config.ts, make sure those variables are also set inside EAS Build. You can do that using "env" field in eas.json or EAS Secrets. '; + 'If you are using environment variables to switch between projects in app.config.js/app.config.ts, make sure those variables are also set inside EAS Build. You can do that using "env" field in eas.json or EAS environment variables. '; } throw new UserFacingError( 'EAS_BUILD_PROJECT_ID_MISMATCH', diff --git a/packages/build-tools/src/steps/utils/expoUpdates.ts b/packages/build-tools/src/steps/utils/expoUpdates.ts index 8e6a3c70..65dd76ef 100644 --- a/packages/build-tools/src/steps/utils/expoUpdates.ts +++ b/packages/build-tools/src/steps/utils/expoUpdates.ts @@ -40,7 +40,7 @@ export async function configureEASUpdateAsync({ `Runtime version from the app config evaluated on your local machine (${metadata.runtimeVersion}) does not match the one resolved here (${runtimeVersion}).` ); logger.warn( - "If you're using conditional app configs, e.g. depending on an environment variable, make sure to set the variable in eas.json or configure it with EAS Secret." + "If you're using conditional app configs, e.g. depending on an environment variable, make sure to set the variable in eas.json or configure it with EAS environment variables." ); }