electron-builder-notarize
electron-builder-notarize copied to clipboard
is this possible to support .env as environment?
I want to add appid
and appidpwd
to my private repo by .env
file.
# .env
[email protected]
APPLE_ID_PASSWORD=xxxx-xxxx-xxxx-xxxx
So it can be shared between my devices.
But it seems that it don't recognize .env
file.
Is it possible to support .env
file as environment?
Yeah I can add a simple require('dotenv').config()
at the top of the script.
I probably won't have time to do this until the weekend. If you feel like opening a PR go for it 😄
@karaggeorge I open the pr #15 ,please check it~
@arvinxx You can use env-cmd --file ./.env [command]
simply as starter
I use
env-cmd --file ./.env node ./package/builder.js
builder.js
const builder = require('electron-builder');
(async () => {
try {
await builder.build({config});
} catch (exc) {
console.error(exc);
process.exit(1);
}
})();
or .env-cmdrc
{
"myconfig": {
"APPLE_ID": "***",
"APPLE_ID_PASSWORD": "***",
"CSC_NAME": "*** OOO (***)",
"TEAM_SHORT_NAME": "***"
}
}
with
env-cmd --environments myconfig
You even can mix this
env-cmd --file ./.env env-cmd --environments myconfig
Now its implemented on version 1.5.0
~~I haven't gotten this working even in 1.5.0.~~
Oops. Don't export APPLE_ID=XXXX
like you would to source
the .env
- Just APPLE_ID=XXXX
.