File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed
Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 4949 # Bumps the version and automatically locks and syncs.
5050 - name : Bump version
5151 id : bump-version
52- run : ./scripts/bump-version.sh
52+ run : |
53+ set -euxo pipefail
54+
55+ CURRENT_VERSION="$(uv version --short)"
56+ readonly CURRENT_VERSION
57+
58+ readonly MAJOR="${CURRENT_VERSION%%.*}"
59+ readonly REMAINING="${CURRENT_VERSION#*.}"
60+ readonly MINOR="${REMAINING%%.*}"
61+ readonly PATCH="${CURRENT_VERSION##*.}"
62+
63+ NEW_MAJOR="$MAJOR"
64+ NEW_MINOR="$MINOR"
65+ NEW_PATCH="$((PATCH + 1))"
66+
67+ if [[ "$NEW_PATCH" -gt 99 ]] ; then
68+ NEW_PATCH=0
69+ NEW_MINOR="$((NEW_MINOR + 1))"
70+ fi
71+
72+ if [[ "$NEW_MINOR" -gt 99 ]] ; then
73+ NEW_MINOR=0
74+ NEW_MAJOR="$((NEW_MAJOR + 1))"
75+ fi
76+
77+ readonly NEW_VERSION="$NEW_MAJOR.$NEW_MINOR.$NEW_PATCH"
78+
79+ # This automatically bumps the version, locks, and syncs.
80+ uv version "$NEW_VERSION"
5381 shell : bash
5482
5583 - name : Created signed commit and push tags
You can’t perform that action at this time.
0 commit comments