summaryrefslogtreecommitdiffstats
path: root/integration/src/release_scripts/releaseRepo.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/releaseRepo.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/releaseRepo.sh')
-rwxr-xr-xintegration/src/release_scripts/releaseRepo.sh39
1 files changed, 24 insertions, 15 deletions
diff --git a/integration/src/release_scripts/releaseRepo.sh b/integration/src/release_scripts/releaseRepo.sh
index c2aa95a4..ef1592f2 100755
--- a/integration/src/release_scripts/releaseRepo.sh
+++ b/integration/src/release_scripts/releaseRepo.sh
@@ -20,9 +20,7 @@
# ============LICENSE_END==================================================
#
-set -e
-
-SCRIPT_NAME=`basename $0`
+SCRIPT_NAME=$(basename "$0")
repo_location="./"
release_data_file="./pf_release_data.csv"
@@ -121,11 +119,14 @@ then
exit 1
fi
-read repo \
+# shellcheck disable=SC2034
+# shellcheck disable=SC2046
+read -r repo \
latest_released_tag \
latest_snapshot_tag \
- changed_files docker_images \
- <<< $( grep $specified_repo $release_data_file | tr ',' ' ' )
+ changed_files \
+ docker_images \
+ <<< $(grep "$specified_repo" "$release_data_file" | tr ',' ' ' )
if [ ! "$repo" = "$specified_repo" ]
then
@@ -137,7 +138,7 @@ next_release_version=${latest_snapshot_tag%-*}
while true
do
- read -p "have you run 'stage_release' on the '$repo' repo? " yes_no
+ read -r -p "have you run 'stage_release' on the '$repo' repo? " yes_no
case $yes_no in
[Yy]* ) break
;;
@@ -150,22 +151,30 @@ do
esac
done
-saved_current_dir=`pwd`
-cd $repo_location/$repo
+saved_current_dir=$(pwd)
+cd "$repo_location/$repo" || exit 1
if [ "$docker_images" != "" ]
then
- mkart.sh -d
+ mkart_flag="-d"
else
- mkart.sh
+ mkart_flag=""
+fi
+
+if ! mkart.sh "$mkart_flag"
+then
+ echo "generation of artifact release yaml file failed"
+ cd "$saved_current_dir" || exit 1
+ exit 1
fi
-cd $saved_current_dir
+
+cd "$saved_current_dir" || exit 1
echo "generating commit for $repo release: $latest_released_tag-->$next_release_version . . ."
generateCommit.sh \
- -l $repo_location \
- -r $repo \
- -i $issue_id \
+ -l "$repo_location" \
+ -r "$repo" \
+ -i "$issue_id" \
-e "Release $repo: $next_release_version" \
-m "This commit releases repo $repo."