Skip to content

Commit

Permalink
Merge pull request #175 from Crossbell-Box/develop
Browse files Browse the repository at this point in the history
fix: Modified the condition of the IS_CI flag
  • Loading branch information
dohooo authored Jul 4, 2023
2 parents 3950447 + f028740 commit 6d7d640
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scripts/set-app-config-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ const { version } = require("../package.json");

function setAppConfigEnv() {
const ENV = process.env.NODE_ENV ?? "production";
const IS_EAS_CI = process.env.EAS_BUILD === "true";
const IS_CI = process.env.EAS_BUILD === "true" || process.env.GITHUB_ACTIONS === "true";

if (IS_EAS_CI) {
if (IS_CI) {
dotenv.config({ path: process.env.ENV_FILE_COMMON });
dotenv.config({ path: process.env[`ENV_FILE_${ENV.toUpperCase()}`] });
}
Expand All @@ -26,24 +26,24 @@ function setAppConfigEnv() {
host: HOST,
scheme: `${SCHEME}.development`,
icon: "./assets/icon.development.png",
androidGoogleServicesFile: IS_EAS_CI ? process.env.ANDROID_GOOGLE_SERVICES_DEVELOPMENT : "./google-services.development.json",
iosGoogleServicesFile: IS_EAS_CI ? process.env.IOS_GOOGLE_SERVICES_DEVELOPMENT : "./GoogleService-Info.development.plist",
androidGoogleServicesFile: IS_CI ? process.env.ANDROID_GOOGLE_SERVICES_DEVELOPMENT : "./google-services.development.json",
iosGoogleServicesFile: IS_CI ? process.env.IOS_GOOGLE_SERVICES_DEVELOPMENT : "./GoogleService-Info.development.plist",
},
staging: {
name: "xLog-preview",
host: HOST,
scheme: `${SCHEME}.staging`,
icon: "./assets/icon.staging.png",
androidGoogleServicesFile: IS_EAS_CI ? process.env.ANDROID_GOOGLE_SERVICES_STAGING : "./google-services.staging.json",
iosGoogleServicesFile: IS_EAS_CI ? process.env.IOS_GOOGLE_SERVICES_STAGING : "./GoogleService-Info.staging.plist",
androidGoogleServicesFile: IS_CI ? process.env.ANDROID_GOOGLE_SERVICES_STAGING : "./google-services.staging.json",
iosGoogleServicesFile: IS_CI ? process.env.IOS_GOOGLE_SERVICES_STAGING : "./GoogleService-Info.staging.plist",
},
production: {
name: "xLog",
host: HOST,
scheme: SCHEME,
icon: "./assets/icon.png",
androidGoogleServicesFile: IS_EAS_CI ? process.env.ANDROID_GOOGLE_SERVICES_PRODUCTION : "./google-services.production.json",
iosGoogleServicesFile: IS_EAS_CI ? process.env.IOS_GOOGLE_SERVICES_PRODUCTION : "./GoogleService-Info.production.plist",
androidGoogleServicesFile: IS_CI ? process.env.ANDROID_GOOGLE_SERVICES_PRODUCTION : "./google-services.production.json",
iosGoogleServicesFile: IS_CI ? process.env.IOS_GOOGLE_SERVICES_PRODUCTION : "./GoogleService-Info.production.plist",
},
};

Expand Down

0 comments on commit 6d7d640

Please sign in to comment.