Skip to content

Commit

Permalink
DAOS-16741 ci: Enable change of origin (#15380)
Browse files Browse the repository at this point in the history
The githooks support DAOS_ORIGIN setting, propagate this
to the get_release_branch script.

Signed-off-by: Jeff Olivier <[email protected]>
  • Loading branch information
jolivier23 authored Oct 29, 2024
1 parent 1a53cc9 commit 30ee2e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions utils/githooks/find_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if [ -z "$TARGET" ]; then
# as the target, calculated as the sum of the commits this branch is ahead and
# behind.
# check master, then current release branches, then current feature branches.
export ORIGIN
TARGET="$ORIGIN/$(utils/rpms/packaging/get_release_branch "feature/cat_recovery feature/multiprovider")"
echo " Install gh command to auto-detect target branch, assuming $TARGET."
fi
Expand Down
3 changes: 1 addition & 2 deletions utils/rpms/packaging/get_release_branch
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
# find the base branch of the current branch
# base branches can be master, release/2.4+, release/3+
# or optionally branches passed into $1

set -eu -o pipefail
IFS=' ' read -r -a add_bases <<< "${1:-}"
origin=origin
origin="${ORIGIN:-origin}"
mapfile -t all_bases < <(echo "master"
git branch -r | sed -ne "/^ $origin\\/release\\/\(2.[4-9]\|[3-9]\)/s/^ $origin\\///p")
all_bases+=("${add_bases[@]}")
Expand Down

0 comments on commit 30ee2e8

Please sign in to comment.