ci: Document why IN_GETOPT_BIN env var is needed on macOS

This was added in commit b705bade44, but I
keep forgetting the background that this is needed for the retry Bash
script. So document it.
This commit is contained in:
MarcoFalke committed 2025-10-24 13:11:25 +02:00
1 parent fabe516440
commit 5555bce994
2 files changed
+9 -5

No files matched your search

+9
View File
@@ -145,6 +145,15 @@ def main():
).stdout.strip() ).stdout.strip()
os.environ["CI_CONTAINER_ID"] = container_id os.environ["CI_CONTAINER_ID"] = container_id
# GNU getopt is required for the CI_RETRY_EXE script
if os.getenv("CI_OS_NAME") == "macos":
prefix = run(
["brew", "--prefix", "gnu-getopt"],
stdout=subprocess.PIPE,
text=True,
).stdout.strip()
os.environ["IN_GETOPT_BIN"] = f"{prefix}/bin/getopt"
run(["./ci/test/02_run_container.sh"]) # run the remainder run(["./ci/test/02_run_container.sh"]) # run the remainder
-5
View File
@@ -17,11 +17,6 @@ else
mkdir -p "${PREVIOUS_RELEASES_DIR}" mkdir -p "${PREVIOUS_RELEASES_DIR}"
fi fi
if [ "$CI_OS_NAME" == "macos" ]; then
IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt"
export IN_GETOPT_BIN
fi
CI_EXEC () { CI_EXEC () {
$CI_EXEC_CMD_PREFIX bash -c "export PATH=\"/path_with space:${BINS_SCRATCH_DIR}:${BASE_ROOT_DIR}/ci/retry:\$PATH\" && cd \"${BASE_ROOT_DIR}\" && $*" $CI_EXEC_CMD_PREFIX bash -c "export PATH=\"/path_with space:${BINS_SCRATCH_DIR}:${BASE_ROOT_DIR}/ci/retry:\$PATH\" && cd \"${BASE_ROOT_DIR}\" && $*"
} }