File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -efu
4+ IFS=$' \n '
5+
6+ # shellcheck disable=SC2207 # Intentionally splitting. No globbing due to set -f.
7+ tags=(
8+ $( git tag --points-at HEAD -- ' v*' )
9+ )
10+
11+ count=" ${# tags[@]} "
12+ if (( count != 1 )) ; then
13+ printf ' %s: error: Found %d matching v* tags, need exactly 1.\n' " $0 " " $count " >&2
14+ exit 1
15+ fi
16+
17+ printf ' %s\n' " ${tags[0]} "
Original file line number Diff line number Diff line change @@ -295,3 +295,20 @@ check-mode:
295295# Delete `gix-packetline-blocking/src` and regenerate from `gix-packetline/src`
296296copy-packetline:
297297 etc/copy-packetline.sh
298+
299+ # Get the unique `v*` tag at `HEAD`, or fail with an error
300+ unique-v-tag:
301+ etc/unique-v-tag.sh
302+
303+ # Trigger the `release.yml` workflow on the current `v*` tag
304+ run-release-workflow repo='':
305+ optional_repo_arg={{ quote (repo) }} && \
306+ export GH_REPO="${optional_repo_arg:-"${GH_REPO:-GitoxideLabs/gitoxide}"}" && \
307+ tag_name="$({{ j }} unique-v-tag)" && \
308+ printf 'Running release.yml in %s repo for %s tag.\n' "$GH_REPO" "$tag_name" && \
309+ gh workflow run release.yml --ref "refs/tags/$tag_name"
310+
311+ # Run `cargo smart-release` and then trigger `release.yml` for the `v*` tag
312+ roll-release *csr-args:
313+ cargo smart-release {{ csr-args }}
314+ {{ j }} run-release-workflow
You can’t perform that action at this time.
0 commit comments