From 2909142e23a996ae6a4591ec0c7ff76ba9cc070e Mon Sep 17 00:00:00 2001 From: Carlos Quintana Date: Mon, 1 Aug 2022 09:49:58 +0200 Subject: [PATCH] Enable Login with Proton --- .github/workflows/release.yaml | 2 +- scripts/generateBuildConfig.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) 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));