fix(release): remove unsupported --id flag and mask secrets in logs
This commit is contained in:
		
					parent
					
						
							
								3192716e69
							
						
					
				
			
			
				commit
				
					
						77b5f8fb5a
					
				
			
		
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
					@ -65,7 +65,11 @@ const outDir = path.join(root, 'releases', version);
 | 
				
			||||||
fs.mkdirSync(outDir, { recursive: true });
 | 
					fs.mkdirSync(outDir, { recursive: true });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function run(cmd) {
 | 
					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' });
 | 
					  execSync(cmd, { stdio: 'inherit' });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -79,7 +83,7 @@ try {
 | 
				
			||||||
    '--channel=unlisted',
 | 
					    '--channel=unlisted',
 | 
				
			||||||
    `--api-key="${issuer}"`,
 | 
					    `--api-key="${issuer}"`,
 | 
				
			||||||
    `--api-secret="${secret}"`,
 | 
					    `--api-secret="${secret}"`,
 | 
				
			||||||
    `--id="${addonId}"`,
 | 
					    // ID is read from manifest.json; newer web-ext may not support --id
 | 
				
			||||||
    `--artifacts-dir "${outDir}"`,
 | 
					    `--artifacts-dir "${outDir}"`,
 | 
				
			||||||
  ].join(' ');
 | 
					  ].join(' ');
 | 
				
			||||||
  run(signCmd);
 | 
					  run(signCmd);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue