mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
Normalize rusty_v8 checksum manifest line endings (#36797)
## What changed - Write staged `rusty_v8` checksum manifests with LF line endings on every platform. - Strip carriage returns when verifying manifests so existing Windows-built releases with CRLF line endings remain usable. ## Testing - Assert that staged checksum manifests contain no carriage returns. GitOrigin-RevId: 142855c147a08a60f5e5782c61e2fcd6b2e350d6
This commit is contained in:
committed by
copyberry
parent
bd12b3a9ec
commit
51d4aa946c
5
.github/actions/setup-rusty-v8/action.yml
vendored
5
.github/actions/setup-rusty-v8/action.yml
vendored
@@ -44,10 +44,11 @@ runs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Existing Windows-built release manifests use CRLF line endings.
|
||||
if command -v sha256sum >/dev/null 2>&1; then
|
||||
(cd "${binding_dir}" && sha256sum -c "${checksums_path}")
|
||||
(cd "${binding_dir}" && tr -d '\r' < "${checksums_path}" | sha256sum -c -)
|
||||
else
|
||||
(cd "${binding_dir}" && shasum -a 256 -c "${checksums_path}")
|
||||
(cd "${binding_dir}" && tr -d '\r' < "${checksums_path}" | shasum -a 256 -c -)
|
||||
fi
|
||||
echo "RUSTY_V8_ARCHIVE=${archive_path}" >> "${GITHUB_ENV}"
|
||||
echo "RUSTY_V8_SRC_BINDING_PATH=${binding_path}" >> "${GITHUB_ENV}"
|
||||
|
||||
2
.github/scripts/rusty_v8_bazel.py
vendored
2
.github/scripts/rusty_v8_bazel.py
vendored
@@ -245,7 +245,7 @@ def stage_artifacts(
|
||||
shutil.copyfile(binding_path, staged_binding)
|
||||
|
||||
staged_checksums = output_dir / staged_checksums_name(target, artifact_profile)
|
||||
with staged_checksums.open("w", encoding="utf-8") as checksums:
|
||||
with staged_checksums.open("w", encoding="utf-8", newline="\n") as checksums:
|
||||
for path in [staged_library, staged_binding]:
|
||||
digest = hashlib.sha256()
|
||||
with path.open("rb") as artifact:
|
||||
|
||||
5
.github/scripts/test_rusty_v8_bazel.py
vendored
5
.github/scripts/test_rusty_v8_bazel.py
vendored
@@ -191,6 +191,11 @@ class RustyV8BazelTest(unittest.TestCase):
|
||||
},
|
||||
{path.name for path in Path(output_dir).iterdir()},
|
||||
)
|
||||
checksums = (
|
||||
Path(output_dir)
|
||||
/ "rusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.sha256"
|
||||
).read_bytes()
|
||||
self.assertNotIn(b"\r", checksums)
|
||||
|
||||
def test_upstream_release_pair_paths(self) -> None:
|
||||
self.assertEqual(
|
||||
|
||||
Reference in New Issue
Block a user