Skip to content

Commit 0cb7f5c

Browse files
committed
fix(release mono-repo): fix tag stripping (3) (extraneous v2)
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
1 parent a710fd7 commit 0cb7f5c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ jobs:
320320
declare -a ALL_RELATIVE_MODULES
321321
mapfile -d' ' -t ALL_RELATIVE_MODULES < <(printf "%s" "${MODULE_RELATIVE_NAMES}")
322322
for module_relative_name in "${ALL_RELATIVE_MODULES[@]}"; do
323-
module_relative_name=${module_relative_name#"github.com/${GITHUB_REPO}/"}|sed -E 's/\/v[0-9]+$//' # in some case, the module is not prefixed by the root module, e.g. "v2" modules.
323+
module_relative_name=$(echo ${module_relative_name#"github.com/${GITHUB_REPO}/"}|sed -E 's/\/v[0-9]+$//') # in some case, the module is not prefixed by the root module, e.g. "v2" modules.
324324
if [[ -z "${module_relative_name}" || "${module_relative_name}" == "{root}" ]] ; then
325325
module_tag="${NEXT_TAG}" # e.g. "v0.24.0"
326326
else

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ 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.com/${GITHUB_REPO}/"}|sed -E 's/\/v[0-9]+$//' # in some case, the module is not prefixed by the root module, e.g. "v2" modules.
209+
relative_module=$(echo ${relative_module#"github.com/${GITHUB_REPO}/"}|sed -E 's/\/v[0-9]+$//') # in some case, the module is not prefixed by the root module, e.g. "v2" modules.
210210
folder="${ALL_FOLDERS[$i]}"
211211
212212
# Build exclusion list for child modules
213213
excluded=$(other_module_paths "${i}" "${folder}")
214214
215215
# Determine module name and tag pattern
216-
if [[ "${relative_module}" == "{root}" ]] ; then
216+
if [[ -z "${relative_module}" || "${relative_module}" == "{root}" ]] ; then
217217
# Root module
218218
module_name=$(basename "${ROOT_MODULE}")
219219
tag_pattern="^${semver_pattern}$"

0 commit comments

Comments
 (0)