fix(release): remove unsupported --id flag and mask secrets in logs

This commit is contained in:
Jordan Wages 2025-08-22 22:01:14 -05:00
commit 77b5f8fb5a

View file

@ -65,7 +65,11 @@ const outDir = path.join(root, 'releases', version);
fs.mkdirSync(outDir, { recursive: true });
function run(cmd) {
console.log(`> ${cmd}`);
// Mask secrets in logs
let shown = cmd;
if (issuer) shown = shown.replaceAll(issuer, '***');
if (secret) shown = shown.replaceAll(secret, '***');
console.log(`> ${shown}`);
execSync(cmd, { stdio: 'inherit' });
}
@ -79,7 +83,7 @@ try {
'--channel=unlisted',
`--api-key="${issuer}"`,
`--api-secret="${secret}"`,
`--id="${addonId}"`,
// ID is read from manifest.json; newer web-ext may not support --id
`--artifacts-dir "${outDir}"`,
].join(' ');
run(signCmd);