From a2e522a1677f87523923608265831b3ed04c4bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Bizjak?= Date: Fri, 27 Oct 2023 09:48:29 +0200 Subject: [PATCH] Support crate names with uppercase letters. --- cargo-concordium/CHANGELOG.md | 18 ++++++++++++++++++ cargo-concordium/Cargo.lock | 2 +- cargo-concordium/Cargo.toml | 2 +- cargo-concordium/src/build.rs | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/cargo-concordium/CHANGELOG.md b/cargo-concordium/CHANGELOG.md index de804917..882b68a8 100644 --- a/cargo-concordium/CHANGELOG.md +++ b/cargo-concordium/CHANGELOG.md @@ -2,6 +2,24 @@ ## Unreleased changes +## 3.1.4 + +- Support crate names with uppercase letters. + +## 3.1.3 + +- Fix a bug where a missing target directory would fail if a reproducible build + was requested without a schema. + +## 3.1.2 + +- Make sure to ignore the target directory also on Windows. + +## 3.1.1 + +- Do not include file modification times in the tar archive produced as part of + a verifiable build. + ## 3.1.0 - Support verifiable/reproducible builds. diff --git a/cargo-concordium/Cargo.lock b/cargo-concordium/Cargo.lock index fabe177c..12c975ba 100644 --- a/cargo-concordium/Cargo.lock +++ b/cargo-concordium/Cargo.lock @@ -299,7 +299,7 @@ dependencies = [ [[package]] name = "cargo-concordium" -version = "3.1.3" +version = "3.1.4" dependencies = [ "ansi_term", "anyhow", diff --git a/cargo-concordium/Cargo.toml b/cargo-concordium/Cargo.toml index 27e24cac..71b88869 100644 --- a/cargo-concordium/Cargo.toml +++ b/cargo-concordium/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-concordium" -version = "3.1.3" +version = "3.1.4" authors = ["Concordium "] edition = "2021" license-file = "../LICENSE" diff --git a/cargo-concordium/src/build.rs b/cargo-concordium/src/build.rs index 6823b446..8035a2a1 100644 --- a/cargo-concordium/src/build.rs +++ b/cargo-concordium/src/build.rs @@ -44,7 +44,7 @@ const ENCODER: base64::engine::GeneralPurpose = general_purpose::STANDARD; /// /// Used for converting crate names, which often contain `-`, to module names, /// which cannot have `-`. -fn to_snake_case(string: &str) -> String { string.to_lowercase().replace('-', "_") } +fn to_snake_case(string: &str) -> String { string.replace('-', "_") } /// Get the crate's metadata either by looking for the `Cargo.toml` file at the /// `--manifest-path` or at the ancestors of the current directory.