release: add the env.tag to output

This commit is contained in:
Girish Ramakrishnan
2024-12-09 09:03:36 +01:00
parent cc759a8427
commit 00a643e70a

View File

@@ -205,15 +205,15 @@ async function createRelease(options) {
if (!fs.existsSync(options.code)) return exit('code must be a valid file'); if (!fs.existsSync(options.code)) return exit('code must be a valid file');
// "gpgconf --reload gpg-agent" is handy to reset existing password in the agent. See https://dev.gnupg.org/T3485 for pinentry-mode (--pinentry-mode=loopback --batch --passphrase ${passphrase} works if we want to gassword protect // "gpgconf --reload gpg-agent" is handy to reset existing password in the agent. See https://dev.gnupg.org/T3485 for pinentry-mode (--pinentry-mode=loopback --batch --passphrase ${passphrase} works if we want to gassword protect
console.log('Computing GPG signature...'); console.log(`${env.tag} Computing GPG signature...`);
safe.fs.unlinkSync(`${options.code}.sig`); safe.fs.unlinkSync(`${options.code}.sig`);
execSync(`gpg --no-default-keyring --local-user 0EADB19CDDA23CD0FE71E3470A372F8703C493CC --output ${options.code}.sig --detach-sig ${options.code}`, execSync(`gpg --no-default-keyring --local-user 0EADB19CDDA23CD0FE71E3470A372F8703C493CC --output ${options.code}.sig --detach-sig ${options.code}`,
{ stdio: [ null, process.stdout, process.stderr ] } ); { stdio: [ null, process.stdout, process.stderr ] } );
console.log('Uploading source code tarball and signature...'); console.log(`${env.tag} Uploading source code tarball and signature...`);
const sourceTarballName = path.basename(options.code); const sourceTarballName = path.basename(options.code);
execSync(`rsync ${options.code} ubuntu@${env.releasesServer}:/home/ubuntu/releases/${sourceTarballName}`, { stdio: [ null, process.stdout, process.stderr ] } ); execSync(`rsync --progress ${options.code} ubuntu@${env.releasesServer}:/home/ubuntu/releases/${sourceTarballName}`, { stdio: [ null, process.stdout, process.stderr ] } );
execSync(`rsync ${options.code}.sig ubuntu@${env.releasesServer}:/home/ubuntu/releases/${sourceTarballName}.sig`, { stdio: [ null, process.stdout, process.stderr ] } ); execSync(`rsync --progress ${options.code}.sig ubuntu@${env.releasesServer}:/home/ubuntu/releases/${sourceTarballName}.sig`, { stdio: [ null, process.stdout, process.stderr ] } );
options.code = `https://${env.releasesServer}/${sourceTarballName}`; options.code = `https://${env.releasesServer}/${sourceTarballName}`;
} }
@@ -240,7 +240,7 @@ async function createRelease(options) {
releases[secondLastVersion].next = null; releases[secondLastVersion].next = null;
delete releases[lastVersion]; delete releases[lastVersion];
console.log('Reverting %s', lastVersion); console.log(`${env.tag} Reverting ${lastVersion}`);
return await verifyAndUpload(env, releases); return await verifyAndUpload(env, releases);
} }