diff --git a/tools/ci-build/runtime-versioner/src/command/patch.rs b/tools/ci-build/runtime-versioner/src/command/patch.rs index 2bc2bacfe38b83230d7f67684fa68e4bf9424ec1..2984fbc17c26f558fd30084f7c3de37ba60aaf69 100644 --- a/tools/ci-build/runtime-versioner/src/command/patch.rs +++ b/tools/ci-build/runtime-versioner/src/command/patch.rs @@ -29,11 +29,6 @@ pub fn patch(args: PatchRuntime) -> Result<()> { bail!("aws-sdk-rust has a dirty working tree. Aborting."); } - step( - "Patching smithy-rs/gradle.properties with given crate version numbers", - || patch_gradle_properties(&smithy_rs, &args), - )?; - // Use aws:sdk:assemble to generate both the smithy-rs runtime and AWS SDK // runtime crates with the correct version numbers. step("Generating an AWS SDK", || { @@ -96,31 +91,6 @@ pub fn patch_with(args: PatchRuntimeWith) -> Result<()> { Ok(()) } -fn patch_gradle_properties(smithy_rs: &Repo, args: &PatchRuntime) -> Result<()> { - let props_path = smithy_rs.root.join("gradle.properties"); - let props = - fs::read_to_string(&props_path).context("failed to read smithy-rs/gradle.properties")?; - let mut new_props = String::with_capacity(props.len()); - for line in props.lines() { - if line.starts_with("smithy.rs.runtime.crate.stable.version=") { - new_props.push_str(&format!( - "smithy.rs.runtime.crate.stable.version={}", - args.stable_crate_version - )); - } else if line.starts_with("smithy.rs.runtime.crate.unstable.version=") { - new_props.push_str(&format!( - "smithy.rs.runtime.crate.unstable.version={}", - args.unstable_crate_version - )); - } else { - new_props.push_str(line); - } - new_props.push('\n'); - } - fs::write(&props_path, new_props).context("failed to write smithy-rs/gradle.properties")?; - Ok(()) -} - fn apply_version_only_dependencies(aws_sdk_rust: &Repo) -> Result<()> { aws_sdk_rust .cmd( diff --git a/tools/ci-build/runtime-versioner/src/main.rs b/tools/ci-build/runtime-versioner/src/main.rs index 08560799b2a2e04fe35a06361d8a66132481bb11..853395cb31f26389d5f01dc262770f48a69d87d5 100644 --- a/tools/ci-build/runtime-versioner/src/main.rs +++ b/tools/ci-build/runtime-versioner/src/main.rs @@ -59,11 +59,15 @@ pub struct PatchRuntime { #[arg(long)] previous_release_tag: Option, /// Version number for stable crates. + /// + /// Deprecated: this argument is ignored #[arg(long)] - stable_crate_version: String, + stable_crate_version: Option, /// Version number for unstable crates. + /// + /// Deprecated: this argument is ignored #[arg(long)] - unstable_crate_version: String, + unstable_crate_version: Option, } #[derive(clap::Args, Clone)] diff --git a/tools/ci-scripts/check-semver-hazards b/tools/ci-scripts/check-semver-hazards index 460fb5a46cba10c0e7323f943868a99a213c561c..4ccd14b9f86c6c09cacfd6f2a745705236aca186 100755 --- a/tools/ci-scripts/check-semver-hazards +++ b/tools/ci-scripts/check-semver-hazards @@ -10,14 +10,9 @@ C_YELLOW='\033[1;33m' C_RESET='\033[0m' -if [ "$#" -ne 2 ]; then - echo "Usage: check-semver-hazards " - exit 1 +if [ "$#" -ne 0 ]; then + echo "Unexpected arguments ignored" fi -STABLE_CRATE_VERSION="$1" -UNSTABLE_CRATE_VERSION="$2" -echo "Stable crate version: ${STABLE_CRATE_VERSION}" -echo "Unstable crate version: ${UNSTABLE_CRATE_VERSION}" # Need to allow warnings since there may be deprecations that the old SDK uses unset RUSTFLAGS @@ -27,9 +22,7 @@ set -eux echo -e "${C_YELLOW}# Patching SDK...${C_RESET}" runtime-versioner patch-runtime \ --sdk-path "$(pwd)/aws-sdk-rust" \ - --smithy-rs-path "$(pwd)/smithy-rs" \ - --stable-crate-version "${STABLE_CRATE_VERSION}" \ - --unstable-crate-version "${UNSTABLE_CRATE_VERSION}" + --smithy-rs-path "$(pwd)/smithy-rs" # Testing just a small subset of the full SDK to check for semver hazards echo -e "${C_YELLOW}# Testing SDK...${C_RESET}"