Skip to content

Commit

Permalink
Merge pull request #86 from bytecodealliance/update-warg-0.9.0
Browse files Browse the repository at this point in the history
upgraded warg 0.9.0 and simplified warg publish
  • Loading branch information
calvinrp authored Sep 4, 2024
2 parents 5e8b074 + 32c6812 commit 5f92186
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions crates/wasm-pkg-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ toml = "0.8.8"
tracing = "0.1.40"
tracing-subscriber = { workspace = true }
url = "2.5.0"
warg-client = "0.8.0"
warg-crypto = "0.8.0"
warg-protocol = "0.8.0"
warg-client = "0.9.0"
warg-crypto = "0.9.0"
warg-protocol = "0.9.0"
wasm-pkg-common = { workspace = true, features = ["metadata-client", "tokio"] }
wit-component = { workspace = true }

Expand Down
11 changes: 1 addition & 10 deletions crates/wasm-pkg-client/src/warg/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,10 @@ impl PackagePublisher for WargBackend {

// start Warg publish, using the keyring to sign
let version = version.clone();
// Check if the package already exists so we can init it if needed
let release = PublishEntry::Release { version, content };
let entries = if let Err(warg_client::ClientError::PackageDoesNotExist { .. }) =
self.client.fetch_package(&name).await
{
vec![PublishEntry::Init, release]
} else {
vec![release]
};
let info = PublishInfo {
name: name.clone(),
head: None,
entries,
entries: vec![PublishEntry::Release { version, content }],
};
let record_id = if let Some(key) = self.signing_key.as_ref() {
self.client.publish_with_info(key, info).await
Expand Down

0 comments on commit 5f92186

Please sign in to comment.