From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"SZEDER Gábor" <szeder.dev@gmail.com>,
"Carlo Marcelo Arenas Belón" <carenas@gmail.com>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Victoria Dye" <vdye@github.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 06/10] CI: consistently use "export" in ci/lib.sh
Date: Thu, 14 Jul 2022 21:39:43 +0200 [thread overview]
Message-ID: <patch-06.10-7cbf8191105-20220714T193808Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-00.10-00000000000-20220714T193808Z-avarab@gmail.com>
Change the "ci/lib.sh" script to consistently use "export", for
e.g. MAKEFLAGS we were exporting it, and then assigning to it, let's
do it the other way around.
Right now this doesn't matter, since we in
e.g. "ci/install-dependencies.sh" source this file, and don't use
something like "env(1)" to retrieve these variables.
But in a subsequent commit we'll "export" these variables through a
wrapper (and to eventually write them to a GitHub CI-specific
$GITHUB_ENV file). This change makes that subsequent change easier to
read, as it won't need to do any control flow refactoring.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
ci/lib.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/ci/lib.sh b/ci/lib.sh
index 3591919ba44..44039152ebc 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -79,7 +79,7 @@ export TERM=${TERM:-dumb}
NPROC=10
# Clear MAKEFLAGS that may come from the outside world.
-export MAKEFLAGS=--jobs=$NPROC
+MAKEFLAGS=--jobs=$NPROC
if test -n "$SYSTEM_COLLECTIONURI" || test -n "$SYSTEM_TASKDEFINITIONSURI"
then
@@ -88,9 +88,10 @@ then
CC="${CC:-gcc}"
export GIT_PROVE_OPTS="--timer --jobs $NPROC --state=failed,slow,save"
- export GIT_TEST_OPTS="--verbose-log -x --write-junit-xml"
+ GIT_TEST_OPTS="--verbose-log -x --write-junit-xml"
test Windows_NT != "$AGENT_OS" ||
GIT_TEST_OPTS="--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS"
+ export GIT_TEST_OPTS
elif test true = "$GITHUB_ACTIONS"
then
CI_TYPE=github-actions
@@ -118,9 +119,10 @@ then
}
export GIT_PROVE_OPTS="--timer --jobs $NPROC"
- export GIT_TEST_OPTS="--verbose-log -x --github-workflow-markup"
+ GIT_TEST_OPTS="--verbose-log -x --github-workflow-markup"
test Windows != "$RUNNER_OS" ||
GIT_TEST_OPTS="--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS"
+ export GIT_TEST_OPTS
else
echo "Could not identify CI type" >&2
env >&2
@@ -187,6 +189,7 @@ linux-leaks)
esac
MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"
+export MAKEFLAGS
end_group
set -x
--
2.37.1.996.g651fc6e809f
next prev parent reply other threads:[~2022-07-14 19:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 19:39 [PATCH 00/10] ci: make it easy to run locally, part 1 Ævar Arnfjörð Bjarmason
2022-07-14 19:39 ` [PATCH 01/10] CI: run "set -ex" early in ci/lib.sh Ævar Arnfjörð Bjarmason
2022-07-14 19:39 ` [PATCH 02/10] CI: remove more dead Travis CI support Ævar Arnfjörð Bjarmason
2022-07-14 19:39 ` [PATCH 03/10] CI: remove dead "tree skipping" code Ævar Arnfjörð Bjarmason
2022-07-14 19:39 ` [PATCH 04/10] CI: make "$jobname" explicit, remove fallback Ævar Arnfjörð Bjarmason
2022-07-14 19:39 ` [PATCH 05/10] CI/lib.sh: stop adding leading whitespace to $MAKEFLAGS Ævar Arnfjörð Bjarmason
2022-07-14 19:39 ` Ævar Arnfjörð Bjarmason [this message]
2022-07-14 19:39 ` [PATCH 07/10] CI: export variables via a wrapper Ævar Arnfjörð Bjarmason
2022-07-14 19:39 ` [PATCH 08/10] CI: don't have "git grep" invoke a pager in tree content check Ævar Arnfjörð Bjarmason
2022-07-14 19:39 ` [PATCH 09/10] CI: have "static-analysis" run a "make ci-static-analysis" target Ævar Arnfjörð Bjarmason
2022-07-14 19:39 ` [PATCH 10/10] CI: have "static-analysis" run "check-builtins", not "documentation" Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=patch-06.10-7cbf8191105-20220714T193808Z-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=szeder.dev@gmail.com \
--cc=vdye@github.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).