Skip to content

Commit

Permalink
fix(publisher): allow config for Electron Release Server to be read f…
Browse files Browse the repository at this point in the history
…rom envars
  • Loading branch information
Crevax authored and malept committed Sep 21, 2017
1 parent fcdc0a0 commit 50d3537
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/util/forge-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default async (dir) => {
electronInstallerRedhat: {},
s3: {},
github_repository: {},
electronReleaseServer: {},
}, forgeConfig);
forgeConfig.make_targets = Object.assign({
win32: ['squirrel'],
Expand Down
4 changes: 4 additions & 0 deletions test/fast/forge-config_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const defaults = {
},
github_repository: {},
s3: {},
electronReleaseServer: {},
};

describe('forge-config', () => {
Expand Down Expand Up @@ -54,7 +55,10 @@ describe('forge-config', () => {
expect(conf.s3.secretAccessKey).to.equal(undefined);

process.env.ELECTRON_FORGE_S3_SECRET_ACCESS_KEY = 'SecretyThing';
process.env.ELECTRON_FORGE_ELECTRON_RELEASE_SERVER_BASE_URL = 'http://example.com';
expect(conf.s3.secretAccessKey).to.equal('SecretyThing');
expect(conf.electronReleaseServer.baseUrl).to.equal('http://example.com');
delete process.env.ELECTRON_FORGE_S3_SECRET_ACCESS_KEY;
delete process.env.ELECTRON_FORGE_ELECTRON_RELEASE_SERVER_BASE_URL;
});
});

0 comments on commit 50d3537

Please sign in to comment.