diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index cfdec04c560823..0cd50e46dd2a04 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -68,6 +68,7 @@ struct PreparedPublishPackage { package: String, version: String, tarball: PublishableTarball, + config: String, } impl PreparedPublishPackage { @@ -158,6 +159,13 @@ async fn prepare_publish( package: package_name.to_string(), version: version.to_string(), tarball, + // the config file is always at the root of a publishing dir, + // so getting the file name is always correct + config: config_path + .file_name() + .unwrap() + .to_string_lossy() + .to_string(), })) } @@ -541,8 +549,12 @@ async fn publish_package( ); let url = format!( - "{}scopes/{}/packages/{}/versions/{}", - registry_api_url, package.scope, package.package, package.version + "{}scopes/{}/packages/{}/versions/{}?config=/{}", + registry_api_url, + package.scope, + package.package, + package.version, + package.config ); let response = client