Automate releases from PR titles and clean up CI workflows.
Add release and PR title checks, shared CI scripts, Gitea PR template, and align pyproject.toml to v0.3.1. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
2bb361e3a3
commit
a8491c005c
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
# shellcheck source=common.sh
|
||||
source "${SCRIPT_DIR}/common.sh"
|
||||
|
||||
usage() {
|
||||
echo "Usage: bump-version.sh <major|minor|patch>" >&2
|
||||
echo " bump-version.sh --from-tag <vX.Y.Z>" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [[ "$1" == "--from-tag" ]]; then
|
||||
if [[ $# -ne 2 ]]; then
|
||||
usage
|
||||
fi
|
||||
VERSION="${2#v}"
|
||||
else
|
||||
BUMP_TYPE="$1"
|
||||
CURRENT=$(latest_tag_version)
|
||||
VERSION=$(bump_semver "$CURRENT" "$BUMP_TYPE")
|
||||
fi
|
||||
|
||||
set_pyproject_version "$VERSION"
|
||||
|
||||
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
|
||||
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "version=${VERSION}"
|
||||
fi
|
||||
|
||||
echo "Updated pyproject.toml to version ${VERSION}" >&2
|
||||
Reference in New Issue
Block a user