Merge remote-tracking branch 'origin/master' into dbkr/debrepo
This commit is contained in:
@@ -10,7 +10,11 @@ exports.default = async function(context) {
|
||||
// from the keychain, so we need to get it from the environment.
|
||||
const userId = process.env.NOTARIZE_APPLE_ID;
|
||||
if (userId === undefined) {
|
||||
throw new Error("User ID not found. Set NOTARIZE_APPLE_ID.");
|
||||
console.log("*************************************");
|
||||
console.log("* NOTARIZE_APPLE_ID is not set. *");
|
||||
console.log("* This build will NOT be notarised. *");
|
||||
console.log("*************************************");
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("Notarising macOS app. This may be some time.");
|
||||
|
||||
@@ -58,6 +58,7 @@ async function main() {
|
||||
let importkey = false;
|
||||
let pkgDir = 'packages';
|
||||
let deployDir = 'deploys';
|
||||
let cfgDir;
|
||||
let targetVersion;
|
||||
|
||||
while (process.argv.length > 2) {
|
||||
@@ -76,6 +77,11 @@ async function main() {
|
||||
process.argv.shift();
|
||||
deployDir = process.argv[2];
|
||||
break;
|
||||
case '--cfgdir':
|
||||
case '-d':
|
||||
process.argv.shift();
|
||||
cfgDir = process.argv[2];
|
||||
break;
|
||||
default:
|
||||
targetVersion = process.argv[2];
|
||||
}
|
||||
@@ -118,6 +124,13 @@ async function main() {
|
||||
});
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cfgDir === undefined) {
|
||||
console.log("No config directory set");
|
||||
console.log("Specify a config directory with --cfgdir or -d");
|
||||
console.log("To build with no config (and no auto-update), pass the empty string (-d '')");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (verify && !haveGpg) {
|
||||
console.log("No working GPG binary: install GPG or pass --noverify to skip verification");
|
||||
@@ -186,6 +199,15 @@ async function main() {
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
if (cfgDir.length) {
|
||||
const configJsonSource = path.join(cfgDir, 'config.json');
|
||||
const configJsonDest = path.join(expectedDeployDir, 'config.json');
|
||||
console.log(configJsonSource + ' -> ' + configJsonDest);
|
||||
await fsPromises.copyFile(configJsonSource, configJsonDest);
|
||||
} else {
|
||||
console.log("Skipping config file");
|
||||
}
|
||||
|
||||
console.log("Pack " + expectedDeployDir + " -> " + ASAR_PATH);
|
||||
await asar.createPackage(expectedDeployDir, ASAR_PATH);
|
||||
console.log("Done!");
|
||||
|
||||
Reference in New Issue
Block a user