From 3ac68a902ec938c5c5971fcbd49e46169ae04c93 Mon Sep 17 00:00:00 2001 From: Mike Kolesnik Date: Wed, 7 Sep 2022 13:19:35 +0300 Subject: [PATCH] Use custom names for update dependency PRs 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 --- scripts/do-release.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/do-release.sh b/scripts/do-release.sh index b00dbee4..35867d30 100755 --- a/scripts/do-release.sh +++ b/scripts/do-release.sh @@ -82,6 +82,9 @@ function update_go_mod() { } function update_dependencies() { + local msg="$1" + shift + clone_and_create_branch "update-dependencies-${release['branch']:-devel}" for dependency; do @@ -89,7 +92,7 @@ function update_dependencies() { 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() { @@ -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 } @@ -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 } @@ -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 ### @@ -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 ###