Skip to content

Commit ba3af2b

Browse files
fix: fix tag_version.sh
1 parent f05ad56 commit ba3af2b

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

tag_version.sh

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -205,27 +205,16 @@ RELEASE_NOTES="$SORTED_COMMITS"
205205

206206
# Update CHANGELOG.md and version in pyproject.toml
207207
if [ "$DRY_RUN" = true ]; then
208-
echo "Would update pyproject.toml version to: $VERSION"
209208
echo "Would update CHANGELOG.md with:"
210209
echo "$NEW_ENTRY"
211-
echo "Would run: git add pyproject.toml CHANGELOG.md"
212-
echo "Would run: git commit -m \"chore: bump version to $VERSION\""
210+
echo "Would run: git add CHANGELOG.md"
211+
echo "Would run: git commit -m \"chore: release $VERSION (CHANGELOG)\""
213212
echo "Would run: git tag -a \"v$VERSION\" -m \"Version $VERSION\""
214213
echo "Would run: git push origin HEAD v$VERSION"
215214
echo "Would run: gh release create \"v$VERSION\" --title \"v$VERSION\" --notes <release notes>"
216215
exit 0
217216
fi
218217

219-
# Update version in pyproject.toml
220-
if [ -f "pyproject.toml" ]; then
221-
# Use sed to update the version line
222-
sed -i.bak "s/^version = \".*\"/version = \"$VERSION\"/" pyproject.toml
223-
rm pyproject.toml.bak
224-
echo "✓ Updated pyproject.toml version to $VERSION"
225-
else
226-
echo "Warning: pyproject.toml not found, skipping version update"
227-
fi
228-
229218
if [ -f "CHANGELOG.md" ]; then
230219
# Keep existing entries (skip the first line "# Changelog")
231220
EXISTING_ENTRIES=$(tail -n +2 CHANGELOG.md)
@@ -241,9 +230,9 @@ fi
241230

242231
echo "CHANGELOG.md updated with commits from $LAST_TAG to HEAD"
243232

244-
# Commit the version and CHANGELOG updates
245-
git add pyproject.toml CHANGELOG.md
246-
git commit -m "chore: bump version to $VERSION"
233+
# Commit CHANGELOG update
234+
git add CHANGELOG.md
235+
git commit -m "chore: release $VERSION (CHANGELOG)"
247236

248237
echo "✓ Committed pyproject.toml and CHANGELOG.md"
249238

0 commit comments

Comments
 (0)