From 3d2236de82be4f34f9c52a34bda522fd4444230a Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 9 Sep 2024 19:32:22 -0600 Subject: [PATCH] Use workspace keys in Cargo.toml --- .github/workflows/build.yaml | 14 ++++++-------- Cargo.lock | 6 +++--- Cargo.toml | 8 ++++++++ objdiff-cli/Cargo.toml | 12 ++++++------ objdiff-core/Cargo.toml | 13 +++++++------ objdiff-gui/Cargo.toml | 12 ++++++------ 6 files changed, 36 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 83e5df4..a3221b3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,14 +32,12 @@ jobs: set -eou pipefail tag='${{github.ref}}' tag="${tag#refs/tags/}" - for file in */Cargo.toml; do - version=$(grep '^version' $file | head -1 | awk -F' = ' '{print $2}' | tr -d '"') - version="v$version" - if [ "$tag" != "$version" ]; then - echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)" - exit 1 - fi - done + version=$(grep '^version' Cargo.toml | head -1 | awk -F' = ' '{print $2}' | tr -d '"') + version="v$version" + if [ "$tag" != "$version" ]; then + echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)" + exit 1 + fi - name: Setup Rust toolchain uses: dtolnay/rust-toolchain@stable with: diff --git a/Cargo.lock b/Cargo.lock index af1aec8..f6901f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2887,7 +2887,7 @@ dependencies = [ [[package]] name = "objdiff-cli" -version = "2.0.0-beta.6" +version = "2.0.0-beta.7" dependencies = [ "anyhow", "argp", @@ -2908,7 +2908,7 @@ dependencies = [ [[package]] name = "objdiff-core" -version = "2.0.0-beta.6" +version = "2.0.0-beta.7" dependencies = [ "anyhow", "arm-attr", @@ -2947,7 +2947,7 @@ dependencies = [ [[package]] name = "objdiff-gui" -version = "2.0.0-beta.6" +version = "2.0.0-beta.7" dependencies = [ "anyhow", "bytes", diff --git a/Cargo.toml b/Cargo.toml index bf52f16..54f1ed6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,3 +10,11 @@ resolver = "2" inherits = "release" lto = "thin" strip = "debuginfo" + +[workspace.package] +version = "2.0.0-beta.7" +authors = ["Luke Street "] +edition = "2021" +license = "MIT OR Apache-2.0" +repository = "https://github.com/encounter/objdiff" +rust-version = "1.74" diff --git a/objdiff-cli/Cargo.toml b/objdiff-cli/Cargo.toml index 4c78603..b39a157 100644 --- a/objdiff-cli/Cargo.toml +++ b/objdiff-cli/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "objdiff-cli" -version = "2.0.0-beta.6" -edition = "2021" -rust-version = "1.70" -authors = ["Luke Street "] -license = "MIT OR Apache-2.0" -repository = "https://github.com/encounter/objdiff" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors.workspace = true +license.workspace = true +repository.workspace = true readme = "../README.md" description = """ A local diffing tool for decompilation projects. diff --git a/objdiff-core/Cargo.toml b/objdiff-core/Cargo.toml index 6c2b289..f152a91 100644 --- a/objdiff-core/Cargo.toml +++ b/objdiff-core/Cargo.toml @@ -1,15 +1,16 @@ [package] name = "objdiff-core" -version = "2.0.0-beta.6" -edition = "2021" -rust-version = "1.70" -authors = ["Luke Street "] -license = "MIT OR Apache-2.0" -repository = "https://github.com/encounter/objdiff" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors.workspace = true +license.workspace = true +repository.workspace = true readme = "../README.md" description = """ A local diffing tool for decompilation projects. """ +documentation = "https://docs.rs/objdiff-core" [lib] crate-type = ["cdylib", "rlib"] diff --git a/objdiff-gui/Cargo.toml b/objdiff-gui/Cargo.toml index d4c005d..14096f0 100644 --- a/objdiff-gui/Cargo.toml +++ b/objdiff-gui/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "objdiff-gui" -version = "2.0.0-beta.6" -edition = "2021" -rust-version = "1.70" -authors = ["Luke Street "] -license = "MIT OR Apache-2.0" -repository = "https://github.com/encounter/objdiff" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors.workspace = true +license.workspace = true +repository.workspace = true readme = "../README.md" description = """ A local diffing tool for decompilation projects.