Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Automated Releases] Add logging and dry run to release script #2986

Merged
merged 12 commits into from
Sep 12, 2022
Prev Previous commit
Next Next commit
async
  • Loading branch information
acywatson committed Sep 12, 2022
commit c9456bf4c3fbbe61ce5f035021e909d764d61226
6 changes: 5 additions & 1 deletion scripts/npm/update-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const {exec} = require('child-process-promise');

const isPrerelease = process.env.npm_package_version.indexOf('-') !== -1;

if (!isPrerelease) {
async function updateChangelog() {
const date = (await exec(`git show --format=%as | head -1`)).stdout.trim();
const header = `## v${process.env.npm_package_version} (${date})`;
const previousReleaseHash = (
Expand All @@ -30,3 +30,7 @@ if (!isPrerelease) {
);
await exec(`git commit --amend --no-edit`);
}

if (!isPrerelease) {
updateChangelog();
}