Skip to content

Commit 5147278

Browse files
Don't update Makefile.am by default
1 parent f574223 commit 5147278

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

doc/developer.catalog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Add new games
2424

2525
3. **Update the catalog:**
2626

27-
Use the ``update_catalog.py`` script to update the Gambit's documentation & build files.
27+
Use the ``update_catalog.py`` script to update Gambit's documentation & build files.
2828

2929
.. code-block:: bash
3030
31-
python src/pygambit/update_catalog.py
31+
python src/pygambit/update_catalog.py --build
3232
3333
.. note::
3434

src/pygambit/update_catalog.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import argparse
12
from pathlib import Path
23

34
import pygambit as gbt
@@ -46,13 +47,20 @@ def update_makefile():
4647

4748
if content != updated_content:
4849
print(f"Updated {str(MAKEFILE_AM)}")
50+
else:
51+
print(f"No changes to add to {str(MAKEFILE_AM)}")
4952

5053

5154
if __name__ == "__main__":
5255

56+
parser = argparse.ArgumentParser()
57+
parser.add_argument("--build", action="store_true")
58+
args = parser.parse_args()
59+
5360
# Create CSV used by RST docs page
5461
gbt.catalog.games().to_csv(CATALOG_CSV, index=False)
55-
print(f"Generated {CATALOG_CSV} for use in docs build.")
62+
print(f"Generated {CATALOG_CSV} for use in local docs build. DO NOT COMMIT.")
5663

5764
# Update the Makefile.am with the current list of catalog files
58-
update_makefile()
65+
if args.build:
66+
update_makefile()

0 commit comments

Comments
 (0)