Commit bb0e822
fix: metadata CBOR lookup, save template address, validate freshness (#114)
* fix: deduplicate find_metadata_cbor and pick newest when multiple exist
Stale build artifacts could leave multiple template_metadata.cbor files
in the build output directory, causing "Multiple metadata files found"
errors. Now picks the most recently modified file.
Also deduplicates the function into a single shared copy in publish.rs,
and shows the error reason when metadata is not found in `tari build`.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: save template address after publish, validate metadata freshness
- After `tari publish`, saves the template address to tari.config.toml
so `tari metadata publish` can omit --template-address
- `tari metadata publish` validates that built CBOR matches Cargo.toml;
if stale, prompts to rebuild before publishing
- Config file is now created at crate root (Cargo.toml) if CWD is a
crate, falling back to git root then CWD
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: bump workspace version to 0.12.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: validate metadata freshness in inspect command
tari metadata inspect now checks if the built CBOR matches Cargo.toml
and prompts to rebuild if stale, matching the behaviour already in
tari metadata publish.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: warn when republishing a template with existing address
If tari.config.toml already has a template-address (from a previous
publish), warn the user that republishing an unchanged binary will fail
and a changed binary will get a new address. Defaults to not proceeding.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: prompt to publish metadata after template publish
When metadata is detected after publishing, the user is asked if they
want to publish it to the community server. The prompt is skipped if
--publish-metadata is already set.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: save template_address with snake_case key matching serde expectation
ProjectConfig has no rename_all, so serde expects snake_case field names.
The toml_edit write was using kebab-case which didn't match.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore(deps): bump tari_ootle_walletd_client to 0.29, update all deps
Updates:
- tari_ootle_walletd_client 0.28 → 0.29
- tari_engine_types 0.28.4 → 0.28.6
- tari_ootle_common_types 0.28.4 → 0.28.6
- tari_ootle_template_metadata 0.4.0 → 0.4.1
- tari_template_lib_types 0.23 → 0.24
- tari_engine 0.28.4 → 0.28.6
- tari_ootle_wallet_sdk 0.28.4 → 0.28.6
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fmt
* fix: inform user when config not found for template address save
Also fixes the config key to use kebab-case (template-address) to match
the ProjectConfig serde rename_all.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* lints
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 1c75c41 commit bb0e822
10 files changed
Lines changed: 245 additions & 192 deletions
File tree
- crates
- cli/src
- cli/commands
- metadata
- template
- project
- publish_lib
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
0 commit comments