github release (golang mia) debugging.
jjb/shell/github-release.sh
---------------------------
o Temporarily disable exit-on-failure within displayCommand().
o Allow progression toward manifestation of the original failure.
o Shellcheck cleanups.
jjb/verify/bbsim.yaml
---------------------
o Remove v2.9 & v2.10 job placeholders, must have misheard the request
earlier because the need now is only for v2.11 views.
packer/provision/basebuild.sh
-----------------------------
o shellcheck: quote $(go env GOPATH) to prevent word/path splitting.
makefiles/
----------
o Added library makefiles/ subdirectory to support more lint targets.
o Makefile proper will need to be updated.
Change-Id: Icc766b90ffe798fe12c0376787f2298a68babbd4
diff --git a/jjb/shell/github-release.sh b/jjb/shell/github-release.sh
index 47e6ce8..0b289ec 100644
--- a/jjb/shell/github-release.sh
+++ b/jjb/shell/github-release.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-
-# Copyright 2018-2022 Open Networking Foundation (ONF) and the ONF Contributors
+# -----------------------------------------------------------------------
+# Copyright 2018-2023 Open Networking Foundation (ONF) and the ONF Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,11 +13,12 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
+#
# github-release.sh
# builds (with make) and uploads release artifacts (binaries, etc.) to github
# given a tag also create checksums files and release notes from the commit
# message
+# -----------------------------------------------------------------------
## -----------------------------------------------------------------------
## Intent:
@@ -32,6 +33,8 @@
## -----------------------------------------------------------------------
function displayCommands()
{
+ set +euo pipefail
+
echo
echo "Installed /usr/lib/go"
echo "-----------------------------------------------------------------------"
@@ -48,6 +51,7 @@
git --version
go version
+ set -euo pipefail
return
}
@@ -105,7 +109,7 @@
# - start release process within that directory
DEST_GOPATH=${DEST_GOPATH:-}
-if [ ! -z "$DEST_GOPATH" ]; then
+if [ -n "$DEST_GOPATH" ]; then
mkdir -p "$GOPATH/src/$DEST_GOPATH"
release_path="$GOPATH/src/$DEST_GOPATH/$GERRIT_PROJECT"
mv "$WORKSPACE/$GERRIT_PROJECT" "$release_path"
@@ -167,3 +171,10 @@
popd
fi
+
+# [SEE ALSO]
+# -----------------------------------------------------------------------
+# https://www.shellcheck.net/wiki/SC2236
+# -----------------------------------------------------------------------
+
+# [EOF]