Skip to content

Commit bb0e822

Browse files
sdbondiclaude
andauthored
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

Cargo.lock

Lines changed: 58 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ members = ["crates/publish_lib", "crates/cli"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.11.0"
6+
version = "0.12.0"
77
edition = "2024"
88
authors = ["The Tari Development Community"]
99
repository = "https://github.com/tari-project/tari-cli"
1010
license = "BSD-3-Clause"
1111

1212
[workspace.dependencies]
13-
tari_ootle_publish_lib = { path = "crates/publish_lib", version = "0.11" }
13+
tari_ootle_publish_lib = { path = "crates/publish_lib", version = "0.12" }
1414

1515
tokio = { version = "1.41.1", features = ["full"] }
1616
serde = { version = "1.0.215", features = ["derive"] }
1717
thiserror = "2.0.12"
1818
url = { version = "2.5.3", features = ["default", "serde"] }
1919

20-
tari_ootle_walletd_client = "0.28"
20+
tari_ootle_walletd_client = "0.29"
2121
tari_engine = "0.28"
2222
tari_engine_types = "0.28"
2323
tari_ootle_common_types = "0.28"
24-
tari_template_lib_types = "0.23"
24+
tari_template_lib_types = "0.24"
2525
tari_ootle_template_metadata = "0.4"

0 commit comments

Comments
 (0)