Skip to content

Commit cc9f10b

Browse files
committed
chore(cz): update tag format
1 parent 6cfeb66 commit cc9f10b

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.cz.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.commitizen]
22
gpg_sign = true
33
name = "cz_conventional_commits"
4-
tag_format = "v$version"
4+
tag_format = "$version"
55
version_scheme = "pep440"
66
version = "2024.10.0"
77
update_changelog_on_bump = true

releases.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# Fetch all tags starting with 'v'
4+
for old_tag in $(git tag | grep '^v[0-9]\+'); do
5+
new_tag="${old_tag#v}" # Remove the 'v' prefix
6+
7+
# Get the release ID for the old tag
8+
release_id=$(gh release view "$old_tag" --json id -q .id 2>/dev/null)
9+
10+
if [[ -n "$release_id" ]]; then
11+
echo "Updating release: $old_tag -> $new_tag"
12+
13+
# Edit the release to use the new tag
14+
gh release edit "$old_tag" --tag "$new_tag"
15+
16+
# Delete the old release if necessary
17+
# gh release delete "$old_tag" --yes
18+
else
19+
echo "No release found for $old_tag, skipping..."
20+
fi
21+
done

0 commit comments

Comments
 (0)