aboutsummaryrefslogtreecommitdiffstats
path: root/integration/src/release_scripts/releaseRepo.sh
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@est.tech>2022-03-03 09:22:21 +0000
committerGerrit Code Review <gerrit@onap.org>2022-03-03 09:22:21 +0000
commitf3dfc58bbc0536c089eac2dfe1068bb987f6924c (patch)
treec1446628e1d35b543b6ef8daf076afafb9f611be /integration/src/release_scripts/releaseRepo.sh
parent62b0f5d9ac022213751d19ee718932e2c268babe (diff)
parentd7d9a664cb6d45b1019f8ac897feac512e5b37e8 (diff)
Merge "Update release scripts for branches"
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."