Skip to content

Commit 1e392a5

Browse files
authored
Merge pull request #1162 from SeaCelo/installer-catalog
Installer: multi-repo install, catalog expansion, and a machine-readable catalog export
2 parents 6e17d5d + 8f322a5 commit 1e392a5

5 files changed

Lines changed: 700 additions & 452 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Check installer catalog
2+
3+
on:
4+
push:
5+
paths:
6+
- 'scripts/install.sh'
7+
- 'scripts/install.ps1'
8+
- 'scripts/repos.json'
9+
- '.github/workflows/check_catalog.yml'
10+
pull_request:
11+
paths:
12+
- 'scripts/install.sh'
13+
- 'scripts/install.ps1'
14+
- 'scripts/repos.json'
15+
- '.github/workflows/check_catalog.yml'
16+
17+
jobs:
18+
catalog-in-sync:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
- name: Emit catalog from each installer
23+
run: |
24+
bash scripts/install.sh --list-json > /tmp/catalog_sh.json
25+
pwsh -File scripts/install.ps1 -ListJson > /tmp/catalog_ps.json
26+
- name: Verify install.sh, install.ps1, and repos.json agree
27+
run: |
28+
norm() { jq -S '{schema_version, repos: (.repos | sort_by(.key))}' "$1"; }
29+
if ! diff <(norm scripts/repos.json) <(norm /tmp/catalog_sh.json); then
30+
echo "::error::install.sh --list-json does not match scripts/repos.json"; exit 1
31+
fi
32+
if ! diff <(norm scripts/repos.json) <(norm /tmp/catalog_ps.json); then
33+
echo "::error::install.ps1 -ListJson does not match scripts/repos.json"; exit 1
34+
fi
35+
echo "Catalog in sync across install.sh, install.ps1, and repos.json."

scripts/QUICK_INSTALL.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A single installer for OG-Core and its country calibrations. Pre-req: **git** installed. Nothing else.
44

5-
It installs uv if needed, clones the repo you choose, runs `uv sync --extra dev`, and verifies the import. Pick the repo from a menu, or pass `--repo` / `-Repo`.
5+
It installs uv if needed, clones the repo(s) you choose, runs `uv sync --extra dev`, and verifies the import. Pick one from a menu, name several with `--repo` / `-Repo`, or install everything with `--all` / `-All`.
66

77
You can run it two ways — paste a one-line command, or download the script and run it. Both do the same thing.
88

@@ -44,27 +44,38 @@ powershell -ExecutionPolicy Bypass -File .\install.ps1
4444

4545
By default the installer shows a menu of repos and prompts for a destination. Flags let you go straight there — they work with either method above:
4646

47-
- `--repo` / `-Repo` — a short key for a repo in the built-in catalog:
47+
- `--repo` / `-Repo` — a short key for a repo in the built-in catalog. To install several at once: on macOS/Linux repeat the flag (`--repo og-zaf --repo og-idn`), or comma-separate; on Windows comma-separate (`-Repo og-zaf,og-idn`). Keys:
4848
- `og-core` — base model ([PSLmodels/OG-Core](https://github.com/PSLmodels/OG-Core))
49-
- `og-eth` — Ethiopia calibration ([EAPD-DRB/OG-ETH](https://github.com/EAPD-DRB/OG-ETH)); works once its uv migration lands
50-
- `--repo-url` / `-RepoUrl` — a full git URL, for any other uv-based repo (a fork, or a country repo not yet in the catalog). Clones the default branch.
51-
- `--branch` / `-Branch`**for development work**: install a non-default branch (e.g. a fork or a migration branch before it merges).
52-
- `--dest` / `-Dest` and `--yes` / `-Yes` — set the parent directory and skip the confirmation prompt.
49+
- `og-eth` — Ethiopia ([EAPD-DRB/OG-ETH](https://github.com/EAPD-DRB/OG-ETH))
50+
- `og-zaf` — South Africa ([EAPD-DRB/OG-ZAF](https://github.com/EAPD-DRB/OG-ZAF))
51+
- `og-idn` — Indonesia ([EAPD-DRB/OG-IDN](https://github.com/EAPD-DRB/OG-IDN))
52+
- `og-phl` — Philippines ([EAPD-DRB/OG-PHL](https://github.com/EAPD-DRB/OG-PHL))
53+
- `--all` / `-All` — install every repo in the catalog (each into its own subfolder).
54+
- `--list` / `-List` and `--list-json` / `-ListJson` — print the repo catalog (human-readable or JSON) and exit, without installing anything. The same catalog is also published as a static file you can fetch directly: [`scripts/repos.json`](repos.json).
55+
- `--repo-url` / `-RepoUrl` — a full git URL for a single custom repo (a fork, or a country repo not yet in the catalog). Clones the default branch.
56+
- `--branch` / `-Branch`**for development work**: install a non-default branch. Single repo only (not valid with `--all` or multiple `--repo`).
57+
- `--dest` / `-Dest` and `--yes` / `-Yes` — set the parent directory and skip every confirmation prompt. Combine with `--repo` / `--all` for a fully hands-free install.
5358

5459
```bash
55-
# macOS / Linux -- OG-Core to ~/Projects/OG-Core, no prompts
60+
# macOS / Linux
61+
# one repo, no prompts
5662
bash install.sh --repo og-core --dest ~/Projects --yes
57-
# any repo by URL (default branch)
58-
bash install.sh --repo-url https://github.com/OWNER/OG-XYZ.git
59-
# a specific branch (development)
63+
# several at once (repeat the flag, or comma-separate)
64+
bash install.sh --repo og-zaf --repo og-idn --dest ~/Projects
65+
# hands-free: install everything, no prompts
66+
bash install.sh --all --dest ~/Projects --yes
67+
# a single custom repo on a specific branch (development)
6068
bash install.sh --repo-url https://github.com/OWNER/OG-XYZ.git --branch my-feature
6169
```
6270

6371
```powershell
64-
# Windows -- OG-Core to C:\Users\<you>\Projects\OG-Core, no prompts
72+
# Windows
73+
# one repo, no prompts
6574
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Repo og-core -Dest C:\Users\$env:USERNAME\Projects -Yes
66-
# any repo by URL (default branch)
67-
powershell -ExecutionPolicy Bypass -File .\install.ps1 -RepoUrl https://github.com/OWNER/OG-XYZ.git
75+
# several at once
76+
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Repo og-zaf,og-idn -Dest C:\OG
77+
# hands-free: install everything, no prompts
78+
powershell -ExecutionPolicy Bypass -File .\install.ps1 -All -Dest C:\OG -Yes
6879
```
6980

7081
More country calibrations get added to the catalog as they migrate to uv.

0 commit comments

Comments
 (0)