summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2016-09-30 15:43:45 +0200
committerChristophe Lyon <christophe.lyon@linaro.org>2016-09-30 15:45:46 +0200
commitc1b487e8875a4f0090e8025b2fdfb90fe6d4c9b7 (patch)
tree25d3e3778067e12f1de7a03567496115275cafdd
parente5eb475b3cf929953b3e59eb31a04d4d364a1566 (diff)
Skip upload if the build phase was skipped.
This is to avoid uploading incomplete archives. Change-Id: Id8306b4e68b52ede05bedc6a4af6f6e834d78dc1
-rwxr-xr-xtcwg-release.sh24
1 files changed, 15 insertions, 9 deletions
diff --git a/tcwg-release.sh b/tcwg-release.sh
index ef2f3a9..4580cf4 100755
--- a/tcwg-release.sh
+++ b/tcwg-release.sh
@@ -881,16 +881,22 @@ pushd $REL_DIR 1>/dev/null
print_info "${bold}Creating tarball gcc-linaro-${rname}.tar.xz..."
tar cfJ gcc-linaro-${rname}.tar.xz gcc-linaro-${rname}
md5sum gcc-linaro-${rname}.tar.xz > gcc-linaro-${rname}.tar.xz.asc
-ask "Do you want to upload the tarball to ${FILESERVER} [N/y] ?" user_ok
-if [ "$user_ok" == "y" ]; then
- scp gcc-linaro-${rname}.tar.* "${FILESERVER}"
- if [ $? -ne 0 ]; then
- print_info "${bold}${red}Uploading to ${FILESERVER} failed. Offending command is:"
- print_info "${bold}scp gcc-linaro-${rname}.tar.* ${FILESERVER}"
- print_info "${bold}${red}Please verify your settings (ssh, server address, destination directory, ...)."
- print_info "${bold}${red}Manual upload is required."
- ask "Press [Enter] to continue"
+
+if [ "${BUILD:+set}" = "set" ]; then
+ ask "Do you want to upload the tarball to ${FILESERVER} [N/y] ?" user_ok
+ if [ "$user_ok" == "y" ]; then
+ scp gcc-linaro-${rname}.tar.* "${FILESERVER}"
+ if [ $? -ne 0 ]; then
+ print_info "${bold}${red}Uploading to ${FILESERVER} failed. Offending command is:"
+ print_info "${bold}scp gcc-linaro-${rname}.tar.* ${FILESERVER}"
+ print_info "${bold}${red}Please verify your settings (ssh, server address, destination directory, ...)."
+ print_info "${bold}${red}Manual upload is required."
+ ask "Press [Enter] to continue"
+ fi
fi
+else
+ print_info "${bold}${red}Skipping upload of ${release} since you skipped the build phase"
+ ask "Press [Enter] to continue"
fi
popd 1>/dev/null