From e459ff8a8c948f30ca8ffb8a0cedfbf23743148a Mon Sep 17 00:00:00 2001 From: nicodes Date: Sat, 10 Oct 2026 09:57:35 +0200 Subject: [PATCH] Document frozen offline installs and verified archive caches --- README.md | 10 +++++++++- main.go | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 102e17e..e1ffe13 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + # GDAM @@ -169,6 +169,14 @@ When `gdam.json` has changed it re-resolves and rewrites the lock; `gdam install --frozen-lockfile` fails instead, which is what CI should run. Commit the lock. +Starting with v0.1.2, verified downloads populate a digest-addressed archive +cache. Use `gdam install --cache-dir /path/to/cache` to fill an explicit cache +while online, then `gdam install --offline --cache-dir /path/to/cache` to restore +from it without contacting the registry or GitHub. Offline mode requires a +matching frozen lock and rechecks every archive digest; a missing, modified or +linked cache entry fails. It cannot discover newer releases or verify current +remote release metadata. + `gdam update @owner/addon@` moves one pin and re-resolves; it is the same command as `gdam add`. diff --git a/main.go b/main.go index 93677d3..761f3d0 100644 --- a/main.go +++ b/main.go @@ -252,7 +252,7 @@ func runInstall(args []string) int { return 2 } if fs.NArg() != 0 { - fmt.Fprintln(os.Stderr, "usage: gdam install [--frozen-lockfile]") + fmt.Fprintln(os.Stderr, "usage: gdam install [--frozen-lockfile] [--offline] [--cache-dir DIR]") return 2 } @@ -311,7 +311,7 @@ Usage: gdam init gdam add @username/addon[@tag] gdam update @username/addon@tag - gdam install [--frozen-lockfile] + gdam install [--frozen-lockfile] [--offline] [--cache-dir DIR] gdam publish @username/addon TAG [ASSET_NAME] gdam remove @username/addon gdam link @username/addon [local_path]