-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1250 from twm/release-pt-3
GHA release pipeline, pt. 3
- Loading branch information
Showing
2 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2022, 2023 Tom Most <[email protected]>; GPLv3+ | ||
# Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2022, 2023, 2024 Tom Most <[email protected]>; GPLv3+ | ||
|
||
set shell := ["bash", "-euc"] | ||
|
||
|
@@ -10,9 +10,19 @@ _static: | |
|
||
# Tag a release and trigger the GHA release workflow | ||
release: | ||
#!/bin/bash | ||
set -exu -o pipefail | ||
git diff --quiet HEAD || exit 1 | ||
[[ $(git rev-parse --abbrev-ref HEAD) == trunk ]] | ||
if [[ $(git rev-parse --abbrev-ref HEAD) != trunk ]] | ||
then | ||
echo "ERROR: Must be on trunk branch" | ||
exit 1 | ||
fi | ||
if ! git diff --quiet HEAD | ||
then | ||
echo "ERROR: Dirty working copy" | ||
exit 1 | ||
fi | ||
tox -e release --notest --recreate | ||
version=$(.tox/release/bin/hatch version) | ||
tag="v${version}" | ||
git tag "$tag" | ||
|