diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bad1b9d..2db5bfc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -113,7 +113,7 @@ jobs: - name: Generate buildConfig shell: bash env: - ENABLE_LOGIN_WITH_PROTON: false + ENABLE_LOGIN_WITH_PROTON: true run: | npm run generate:buildconfig diff --git a/scripts/generateBuildConfig.js b/scripts/generateBuildConfig.js index bead752..b463b9c 100644 --- a/scripts/generateBuildConfig.js +++ b/scripts/generateBuildConfig.js @@ -3,11 +3,19 @@ const path = require('path'); const PATH = path.join(__dirname, '../src', 'popup', 'buildConfig.json'); +const isLoginWithProtonEnabled = () => { + const enableLoginWithProton = process.env.ENABLE_LOGIN_WITH_PROTON; + if (enableLoginWithProton == undefined || enableLoginWithProton === 'true') { + return true; + } + return false; +}; + const config = { features: { - loginWithProtonEnabled: process.env.ENABLE_LOGIN_WITH_PROTON === 'true' + loginWithProtonEnabled: isLoginWithProtonEnabled() }, buildTime: new Date().getTime() }; -fs.writeFileSync(PATH, JSON.stringify(config, null, 2)); \ No newline at end of file +fs.writeFileSync(PATH, JSON.stringify(config, null, 2));