15 lines
546 B
Bash
15 lines
546 B
Bash
#!/usr/bin/env bash
|
|||
|
|
# Tags the published commit with <TAG_PREFIX><version> using jj only, then pushes the tag.
|
||
|
|
# The tag is lightweight (jj creates no annotated tag): the CI release body is the commit message.
|
||
|
|
set -euo pipefail
|
||
|
|
. "$(dirname "$0")/../.crate-kit/scripts/common.sh"
|
||
|
|
version=$(current_version)
|
||
|
|
tag="${TAG_PREFIX:-v}$version"
|
||
|
|
if [ -n "$(jj tag list "$tag" 2>/dev/null)" ]; then
|
||
|
|
err "✗ tag $tag already exists"
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
rev=$(release_rev)
|
||
|
|
jj tag set "$tag" -r "$rev"
|
||
|
|
jj git push --tag "$tag"
|
||
|
|
ok "✓ Release $tag published"
|