Skip to content

Commit

Permalink
Use custom names for update dependency PRs
Browse files Browse the repository at this point in the history
Using just the dependencies sometimes results in commit titles that are
too long.
Instead, use a custom supplied message which should be OK.

Signed-off-by: Mike Kolesnik <[email protected]>
  • Loading branch information
mkolesnik committed Sep 8, 2022
1 parent b6c9041 commit 3ac68a9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/do-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,17 @@ function update_go_mod() {
}

function update_dependencies() {
local msg="$1"
shift

clone_and_create_branch "update-dependencies-${release['branch']:-devel}"

for dependency; do
update_go_mod "$dependency"
done

run_if_defined "$update_dependencies_extra"
create_pr "Update dependencies ($*) to ${release['version']}"
create_pr "Update ${msg} to ${release['version']}"
}

function push_to_repo() {
Expand Down Expand Up @@ -206,7 +209,7 @@ function release_shipyard() {

# Create a PR to pin Shipyard on every one of its consumers
for project in "${SHIPYARD_CONSUMERS[@]}"; do
update_dependencies shipyard || errors=$((errors+1))
update_dependencies Shipyard shipyard || errors=$((errors+1))
done
}

Expand All @@ -219,7 +222,7 @@ function release_admiral() {

# Create a PR to pin Admiral on every one of it's consumers
for project in "${ADMIRAL_CONSUMERS[@]}"; do
update_dependencies admiral || errors=$((errors+1))
update_dependencies Admiral admiral || errors=$((errors+1))
done
}

Expand All @@ -240,7 +243,7 @@ function release_projects() {
# Create a PR for operator to use these versions
local project="submariner-operator"
local update_dependencies_extra=update_operator_versions
update_dependencies "${OPERATOR_CONSUMES[@]}" || errors=$((errors+1))
update_dependencies Operator "${OPERATOR_CONSUMES[@]}" || errors=$((errors+1))
}

### Functions: Installers Stage ###
Expand All @@ -250,7 +253,7 @@ function release_installers() {

# Create a PR for subctl to use these versions
local project="subctl"
update_dependencies "${SUBCTL_CONSUMES[@]}" || errors=$((errors+1))
update_dependencies Subctl "${SUBCTL_CONSUMES[@]}" || errors=$((errors+1))
}

### Functions: Released Stage ###
Expand Down

0 comments on commit 3ac68a9

Please sign in to comment.