[PATCH 01/10] CI: run "set -ex" early in ci/lib.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change ci/lib.sh to run "set -e" before it does anything else, this
help us to assert that we have no failing commands early on in the
file.

While we're at it let's fix a stray typo in
ecaba2ad4c0 (ci/run-build-and-tests: add some structure to the GitHub
workflow output, 2022-05-21), which seemingly added "#" to the middle
of a line while re-wrapping a comment.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
---
 ci/lib.sh | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/ci/lib.sh b/ci/lib.sh
index f095519f8db..4f12bcaabb9 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -1,5 +1,13 @@
 # Library of functions shared by all CI scripts
 
+# Set 'exit on error' for all CI scripts to let the caller know that
+# something went wrong.
+#
+# We'll enable "set -x" below for tracing executed commands, that will
+# help to show how environment variables are set and and dependencies
+# are installed.
+set -e
+
 if test true != "$GITHUB_ACTIONS"
 then
 	begin_group () { :; }
@@ -44,13 +52,6 @@ else
 	begin_group "CI setup"
 fi
 
-# Set 'exit on error' for all CI scripts to let the caller know that
-# something went wrong.
-#
-# We already enabled tracing executed commands earlier. This helps by showing
-# how # environment variables are set and and dependencies are installed.
-set -e
-
 skip_branch_tip_with_tag () {
 	# Sometimes, a branch is pushed at the same time the tag that points
 	# at the same commit as the tip of the branch is pushed, and building
-- 
2.37.1.996.g651fc6e809f




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux