diff --git a/tools/ci-build/publisher/src/subcommand/generate_version_manifest.rs b/tools/ci-build/publisher/src/subcommand/generate_version_manifest.rs index 35d1bef9a4..ffa5eabca1 100644 --- a/tools/ci-build/publisher/src/subcommand/generate_version_manifest.rs +++ b/tools/ci-build/publisher/src/subcommand/generate_version_manifest.rs @@ -26,12 +26,15 @@ pub struct GenerateVersionManifestArgs { /// Revision of `aws-doc-sdk-examples` repository used to retrieve examples #[clap(long)] examples_revision: String, + /// Same as `input_location` but kept for backwards compatibility + #[clap(long, required_unless_present = "input-location")] + location: Option, /// Path containing the generated SDK to generate a version manifest for - #[clap(long)] - input_location: PathBuf, + #[clap(long, required_unless_present = "location")] + input_location: Option, /// Path to a directory in which a version manifest is generated - #[clap(long)] - output_location: PathBuf, + #[clap(long, required_unless_present = "location")] + output_location: Option, /// Optional path to the `versions.toml` manifest from the previous SDK release #[clap(long)] previous_release_versions: Option, @@ -41,6 +44,7 @@ pub async fn subcommand_generate_version_manifest( GenerateVersionManifestArgs { smithy_build, examples_revision, + location, input_location, output_location, previous_release_versions, @@ -56,6 +60,16 @@ pub async fn subcommand_generate_version_manifest( info!("Resolved smithy-rs revision to {}", smithy_rs_revision); let smithy_build_root = SmithyBuildRoot::from_file(smithy_build)?; + let input_location = match (location, input_location) { + (Some(location), None) => location, + (None, Some(input_location)) => input_location, + _ => bail!("Only one of `--location` or `--input-location` should be provided"), + }; + let output_location = match (location, output_location) { + (Some(location), None) => location, + (None, Some(output_location)) => output_location, + _ => bail!("Only one of `--location` or `--output-location` should be provided"), + }; let manifests = discover_package_manifests(input_location.into()) .await .context("discover package manifests")?;