Skip to content

Commit cd45078

Browse files
committed
Remove update-version-from-tag action from trunk.yaml
1 parent e258882 commit cd45078

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

.trunk/trunk.yaml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ actions:
5656
- trunk-upgrade-available
5757
- trunk-check-pre-commit
5858
- ensure-tag-matches-version
59-
- update-version-from-tag
6059
definitions:
6160
- id: ensure-tag-matches-version
6261
description: Hooks to ensure git tag matches version in pyproject.toml
@@ -91,39 +90,6 @@ actions:
9190
echo "Not on main/master branch - skipping tag validation."
9291
fi
9392
exit 0
94-
- id: update-version-from-tag
95-
description: Update version in pyproject.toml from git tag
96-
triggers:
97-
- git_hooks:
98-
- pre-push
99-
run: |
100-
#!/usr/bin/env bash
101-
set -e
102-
103-
# Check if we're on main or master branch
104-
if git rev-parse --abbrev-ref HEAD | grep -q 'main\|master'; then
105-
# Try to get the tag for the current commit, ignore errors
106-
TAG=$(git describe --tags --exact-match "$(git log -n1 --pretty='%h')" 2>/dev/null || true)
107-
108-
# If no tag found, skip updating version entirely
109-
if [ -z "$TAG" ]; then
110-
echo "No tag found for the current commit - skipping version update."
111-
exit 0
112-
fi
113-
114-
# Update pyproject.toml version if it differs from the tag
115-
VERSION=$(grep '^version =' pyproject.toml | sed -E 's/version = "(.*)"/\1/' 2>/dev/null || echo "")
116-
117-
if [ "$TAG" != "$VERSION" ]; then
118-
echo "Updating version in pyproject.toml from '$VERSION' to '$TAG'."
119-
uv version "$TAG"
120-
else
121-
echo "Version in pyproject.toml already matches tag '$TAG'."
122-
fi
123-
else
124-
echo "Not on main/master branch - skipping version update."
125-
fi
126-
exit 0
12793
tools:
12894
enabled:
12995

0 commit comments

Comments
 (0)