Skip to content

Commit a35d5fc

Browse files
committed
fix: v2 release tag automation
1 parent cf44a56 commit a35d5fc

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

scripts/release-plz.sh

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,25 @@ git config user.email [email protected]
3939
cur_pkg_version="$(jq -r .version package.json)"
4040
if [ "$cur_pkg_version" != "${version#v}" ]; then
4141
npm version "${version#v}" --no-git-tag-version
42+
43+
git add package.json package-lock.json
44+
git status
45+
46+
# Create release branch and commit
47+
git checkout -B release
48+
git commit -m "chore: release $version"
49+
50+
# Push to release branch
51+
git push origin release --force
52+
53+
# Create or update PR
54+
if gh pr create --title "chore: release $version" --body "$changelog" --label "release"; then
55+
echo "Created new release PR"
56+
else
57+
gh pr edit --title "chore: release $version" --body "$changelog"
58+
echo "Updated existing release PR"
59+
fi
4260
else
43-
echo "Package.json already at version ${version#v}"
44-
fi
45-
46-
git add package.json package-lock.json
47-
git status
48-
49-
# Create release branch and commit
50-
git checkout -B release
51-
git commit -m "chore: release $version"
52-
53-
# Push to release branch
54-
git push origin release --force
55-
56-
# Create or update PR
57-
if gh pr create --title "chore: release $version" --body "$changelog" --label "release"; then
58-
echo "Created new release PR"
59-
else
60-
gh pr edit --title "chore: release $version" --body "$changelog"
61-
echo "Updated existing release PR"
61+
echo "Package.json already at version ${version#v}, running postversion"
62+
./scripts/postversion.sh
6263
fi

0 commit comments

Comments
 (0)