From 1cfba6ba45644018beb0cd8511bdae855aab3b9a Mon Sep 17 00:00:00 2001 From: Tomasz Kajtoch Date: Mon, 10 Jun 2024 21:07:47 +0200 Subject: [PATCH 1/2] build: update release script to handle yarn berry version command --- packages/eui/scripts/release.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/eui/scripts/release.js b/packages/eui/scripts/release.js index 07ae5b00c1e..180bffba229 100644 --- a/packages/eui/scripts/release.js +++ b/packages/eui/scripts/release.js @@ -133,8 +133,15 @@ const hasStep = (step) => { updateChangelog(changelog, versionTarget); execSync('git commit -m "Updated changelog" -n'); - // update package.json version, git commit, git tag - execSync(`yarn version --new-version ${versionTarget} --version-tag-prefix=v --version-git-tag=true --version-commit-hooks=false`, execOptions); + // Update version number + execSync(`yarn version ${versionTarget}`, execOptions); + + // Commit version number update + execSync('git add package.json', execOptions); + execSync(`git commit --no-verify -m "${versionTarget}"`, execOptions); + + // Create a tag + execSync(`git tag -a -m "v${versionTarget}" "v${versionTarget}"`, execOptions); } if (hasStep('tag') && !isDryRun) { From eb57188ca021a6b34f2534de5ba6b876dd376cb1 Mon Sep 17 00:00:00 2001 From: Tomasz Kajtoch Date: Mon, 10 Jun 2024 22:10:04 +0200 Subject: [PATCH 2/2] build: move `git tag` command exec to the tag step section --- packages/eui/scripts/release.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eui/scripts/release.js b/packages/eui/scripts/release.js index 180bffba229..d3d7f5b1595 100644 --- a/packages/eui/scripts/release.js +++ b/packages/eui/scripts/release.js @@ -139,12 +139,12 @@ const hasStep = (step) => { // Commit version number update execSync('git add package.json', execOptions); execSync(`git commit --no-verify -m "${versionTarget}"`, execOptions); + } + if (hasStep('tag') && !isDryRun) { // Create a tag execSync(`git tag -a -m "v${versionTarget}" "v${versionTarget}"`, execOptions); - } - if (hasStep('tag') && !isDryRun) { // Skip prepush test hook on all pushes - we should have already tested previously, // or we skipped the test step for a reason if (isSpecialRelease) {