diff --git a/scripts/generate_pack.py b/scripts/generate_pack.py index d69656fc..4bac8260 100644 --- a/scripts/generate_pack.py +++ b/scripts/generate_pack.py @@ -2900,7 +2900,9 @@ def _main(held: contextlib.ExitStack) -> None: parser.add_argument( "--offline", action="store_true", - help="Skip data directory freshness check, use cache only", + help="No network at all: data directories and release assets come " + "from the cache only, so a gitignored file never fetched is missing " + "(--no-refresh-data keeps the trees as cached and still fetches assets)", ) parser.add_argument( "--refresh-data", diff --git a/scripts/pipeline.py b/scripts/pipeline.py index f9fd27f9..7b15c223 100644 --- a/scripts/pipeline.py +++ b/scripts/pipeline.py @@ -330,7 +330,9 @@ def main() -> None: "--skip-docs", action="store_true", help="Skip README and site generation" ) parser.add_argument( - "--offline", action="store_true", help="Skip data directory refresh" + "--offline", action="store_true", + help="No network: skips steps 2 to 2b2 and packs only the release " + "assets already in .cache/large/" ) parser.add_argument( "--output-dir", default="dist", help="Pack output directory (default: dist/)" diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index 0e3a6f4c..e71432ab 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -4327,5 +4327,22 @@ class EveryOptionIsDocumented(unittest.TestCase): self.assertEqual(undocumented, []) + +class OfflineHelpSaysWhatItCuts(unittest.TestCase): + """--offline read "Skip data directory freshness check" while it also + stops release assets from downloading: on a fresh clone the gitignored + files were missing from the pack and nothing had announced it.""" + + def test_both_helps_name_the_release_assets(self): + for script in ("generate_pack.py", "pipeline.py"): + with self.subTest(script=script): + out = subprocess.run( + [sys.executable, f"scripts/{script}", "--help"], + capture_output=True, text=True, cwd=str(ROOT), check=True, + ).stdout + block = out.split("--offline", 2)[-1].split("\n --", 1)[0] + self.assertIn("release", " ".join(block.split())) + + if __name__ == "__main__": unittest.main()