You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: justfile
+22
Original file line number
Diff line number
Diff line change
@@ -48,3 +48,25 @@ build:
48
48
fi
49
49
50
50
uv build
51
+
52
+
# Bump our version
53
+
bump-version $VERSION: (_validate_semver VERSION)
54
+
#!/usr/bin/env bash
55
+
set -euxo pipefail
56
+
57
+
test -z "$(git status --porcelain)" || (echo "The working directory is not clean"; exit 1)
58
+
59
+
sed -i 's/^version = .*/version = "'$VERSION'"/g' pyproject.toml
60
+
uv lock --offline
61
+
62
+
git add pyproject.toml *.lock
63
+
git commit -m "Bump version to v{{ VERSION }}"
64
+
65
+
# Validate a version against SemVer
66
+
_validate_semver version:
67
+
#!/usr/bin/env bash
68
+
set -euxo pipefail
69
+
if [[ ! "{{ version }}"=~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then
0 commit comments