Skip to content

Commit fdd4138

Browse files
committed
fix tags relative to repo (to handle xxx/v2)
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
1 parent efea985 commit fdd4138

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/bump-release-monorepo.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ jobs:
280280
MESSAGE_TITLE: ${{ inputs.tag-message-title }}
281281
MESSAGE_BODY: ${{ inputs.tag-message-body }}
282282
MODULE_RELATIVE_NAMES: ${{ needs.detect-modules.outputs.bash-relative-names }}
283+
GITHUB_REPO: ${{ github.repository }}
283284
run: |
284285
# Tag all modules similar to hack/tag_modules.sh
285286
# Note: The PR with updated go.mod files has been merged at this point
@@ -306,7 +307,8 @@ jobs:
306307
declare -a ALL_RELATIVE_MODULES
307308
mapfile -d' ' -t ALL_RELATIVE_MODULES < <(printf "%s" "${MODULE_RELATIVE_NAMES}")
308309
for module_relative_name in "${ALL_RELATIVE_MODULES[@]}"; do
309-
if [[ -z "${module_relative_name}" ]] ; then
310+
module_relative_name=${module_relative_name#"${GITHUB_REPO}"}
311+
if [[ -z "${module_relative_name}" || "${module_relative_name}" == "{root}" ]] ; then
310312
module_tag="${NEXT_TAG}" # e.g. "v0.24.0"
311313
else
312314
module_tag="${module_relative_name}/${NEXT_TAG}" # e.g. "mangling/v0.24.0"

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ jobs:
206206
# Generate module-specific notes (Part 2)
207207
for (( i=0; i<${#ALL_RELATIVE_MODULES[@]}; i++ )); do
208208
relative_module="${ALL_RELATIVE_MODULES[$i]}"
209+
relative_module=${relative_module#"${GITHUB_REPO}"}
209210
folder="${ALL_FOLDERS[$i]}"
210211
211212
# Build exclusion list for child modules

0 commit comments

Comments
 (0)