Skip to content

feat(catalogs): record the resource version of an imported catalog - #24

Merged
nichinichisou0609 merged 1 commit into
mainfrom
feat/catalog-import-version
Oct 4, 2026
Merged

nichinichisou0609 merged 1 commit into
mainfrom
feat/catalog-import-version

Conversation

@nichinichisou0609

Copy link
Copy Markdown
Collaborator

catalogs fetch records the resource version it downloads, but catalogs import recorded one only with --resource-version. Now import takes, in order:

  1. --resource-version, checked like a configured catalog version;
  2. a JP catalog's source version (from its .source.json sidecar); a different --resource-version is an error;
  3. the version in an international file name catalog_<version>_<language>.bin, the name fetch and the cache use (none for main).

The recorded version is also the default label, as with fetch. docs/assets.md describes the order.

Tests: tests/test_cli_assets.py imports catalog_1.0.0.201_en.bin and catalog_main_en.bin and checks the option's precedence and errors.

🤖 Generated with Claude Code

`catalogs import` now records a resource version without `--resource-version`: a JP
catalog's source version, else the version in an international file name
`catalog_<version>_<language>.bin` (none for `main`), the name `fetch` and the cache use.
The version also becomes the default label. An invalid `--resource-version`, or one that
differs from a JP catalog's source version, is an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nichinichisou0609
nichinichisou0609 merged commit a9d0bbd into main Oct 4, 2026
6 checks passed
@nichinichisou0609
nichinichisou0609 deleted the feat/catalog-import-version branch October 4, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant