Skip to content

Commit

Permalink
Fix new runtime crate handling in SDK patcher tool (#3475)
Browse files Browse the repository at this point in the history
The SDK runtime patcher tool used during smithy-rs release to detect
semver breaks was breaking due to the new aws-smithy-wasm crate since it
had a bad assumption in the logic to determine if a runtime crate
changed. This PR corrects that logic to state the runtime crate doesn't
need patching if it didn't exist previously.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
  • Loading branch information
jdisanti authored Mar 11, 2024
1 parent f3b332d commit 16b01d0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tools/ci-build/runtime-versioner/src/command/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,10 @@ fn crate_version_has_changed(
.join(crate_name)
.join("Cargo.toml");
let to_patch_cargo_toml = runtime_crate_path.join(crate_name).join("Cargo.toml");
assert!(
sdk_cargo_toml.exists(),
"{:?} did not exist!",
sdk_cargo_toml
);
if !sdk_cargo_toml.exists() {
// This is a new runtime crate, so there is nothing to patch.
return Ok(false);
}
assert!(
to_patch_cargo_toml.exists(),
"{:?} did not exist!",
Expand Down

0 comments on commit 16b01d0

Please sign in to comment.