summaryrefslogtreecommitdiffstats
path: root/integration/src/release_scripts/generateCommit.sh
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2022-03-01 21:01:03 +0000
committerliamfallon <liam.fallon@est.tech>2022-03-01 21:05:54 +0000
commitd7d9a664cb6d45b1019f8ac897feac512e5b37e8 (patch)
treeaeda2f2c5b71e61abb81a086e69530b021be6f62 /integration/src/release_scripts/generateCommit.sh
parent006a229e166b5656fd9ba320e2b36d33c7e945a8 (diff)
Update release scripts for branches
Release scripts are updated: - Can now handle releasing on a branch for a maintenance release - startPhase.sh script updated to handle all 13 phases of the release process - Various corrections and bug fixes found during the release - scripts updated to comply with IntelliJ shekkcheck suggestions Issue-ID: POLICY-3835 Change-Id: Ibfa49e4132ca61ae0541600fae5f6814cdf7a409 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'integration/src/release_scripts/generateCommit.sh')
-rwxr-xr-xintegration/src/release_scripts/generateCommit.sh41
1 files changed, 18 insertions, 23 deletions
diff --git a/integration/src/release_scripts/generateCommit.sh b/integration/src/release_scripts/generateCommit.sh
index 8c21c308..29e600a2 100755
--- a/integration/src/release_scripts/generateCommit.sh
+++ b/integration/src/release_scripts/generateCommit.sh
@@ -22,7 +22,7 @@
set -e
-SCRIPT_NAME=`basename $0`
+SCRIPT_NAME=$(basename "$0")
repo_location="./"
usage()
@@ -47,13 +47,6 @@ usage()
exit 255;
}
-update_parent=false
-update_common=false
-update_models=false
-update_drools_pdp=false
-update_snapshot=false
-update_docker=false
-
while getopts "hl:r:i:e:m:" opt
do
case $opt in
@@ -129,7 +122,7 @@ then
exit 1
fi
-git -C $repo_location/$specified_repo status | grep '^Your branch is up to date' > /dev/null 2>&1
+git -C "$repo_location/$specified_repo" status | grep '^Your branch is up to date' > /dev/null 2>&1
return_code=$?
if [ $return_code -eq 0 ]
@@ -137,30 +130,32 @@ then
echo "generating commit '$commit_header' . . ."
commit_msg_temp_file=$(mktemp)
- echo "$commit_header" > $commit_msg_temp_file
- echo "" >> $commit_msg_temp_file
- echo "$commit_message" >> $commit_msg_temp_file
- echo "" >> $commit_msg_temp_file
- echo "*** This commit is generated by a PF release script ***" >> $commit_msg_temp_file
- echo "" >> $commit_msg_temp_file
- echo "Issue-ID: $issue_id" >> $commit_msg_temp_file
-
- git -C $repo_location/$specified_repo add .
- git -C $repo_location/$specified_repo commit -s -F "$commit_msg_temp_file"
- rm $commit_msg_temp_file
+ {
+ echo "$commit_header"
+ echo ""
+ echo "$commit_message"
+ echo ""
+ echo "*** This commit is generated by a PF release script ***"
+ echo ""
+ echo "Issue-ID: $issue_id"
+ } > "$commit_msg_temp_file"
+
+ git -C "$repo_location/$specified_repo" add .
+ git -C "$repo_location/$specified_repo" commit -s -F "$commit_msg_temp_file"
+ rm "$commit_msg_temp_file"
echo "commit '$commit_header' generated"
else
echo "updating commit '$commit_header' . . ."
- git -C $repo_location/$specified_repo add .
- git -C $repo_location/$specified_repo commit -as --amend --no-edit
+ git -C "$repo_location/$specified_repo" add .
+ git -C "$repo_location/$specified_repo" commit -as --amend --no-edit
echo "commit '$commit_header' updated"
fi
echo "sending commit '$commit_header' to gerrit . . ."
-git -C $repo_location/$specified_repo review
+git -C "$repo_location/$specified_repo" review
echo "commit '$commit_header' sent to gerrit . . ."