fix(publisher): allow config for Electron Release Server to be read from envars
This commit is contained in:
Родитель
fcdc0a0298
Коммит
50d35374db
|
@ -50,6 +50,7 @@ export default async (dir) => {
|
|||
electronInstallerRedhat: {},
|
||||
s3: {},
|
||||
github_repository: {},
|
||||
electronReleaseServer: {},
|
||||
}, forgeConfig);
|
||||
forgeConfig.make_targets = Object.assign({
|
||||
win32: ['squirrel'],
|
||||
|
|
|
@ -23,6 +23,7 @@ const defaults = {
|
|||
},
|
||||
github_repository: {},
|
||||
s3: {},
|
||||
electronReleaseServer: {},
|
||||
};
|
||||
|
||||
describe('forge-config', () => {
|
||||
|
@ -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;
|
||||
});
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче