Use workspace keys in Cargo.toml

This commit is contained in:
Luke Street 2024-09-09 19:32:22 -06:00
parent bcc5871cd8
commit 3d2236de82
6 changed files with 36 additions and 29 deletions

View File

@ -32,14 +32,12 @@ jobs:
set -eou pipefail set -eou pipefail
tag='${{github.ref}}' tag='${{github.ref}}'
tag="${tag#refs/tags/}" tag="${tag#refs/tags/}"
for file in */Cargo.toml; do version=$(grep '^version' Cargo.toml | head -1 | awk -F' = ' '{print $2}' | tr -d '"')
version=$(grep '^version' $file | head -1 | awk -F' = ' '{print $2}' | tr -d '"') version="v$version"
version="v$version" if [ "$tag" != "$version" ]; then
if [ "$tag" != "$version" ]; then echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)"
echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)" exit 1
exit 1 fi
fi
done
- name: Setup Rust toolchain - name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
with: with:

6
Cargo.lock generated
View File

@ -2887,7 +2887,7 @@ dependencies = [
[[package]] [[package]]
name = "objdiff-cli" name = "objdiff-cli"
version = "2.0.0-beta.6" version = "2.0.0-beta.7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"argp", "argp",
@ -2908,7 +2908,7 @@ dependencies = [
[[package]] [[package]]
name = "objdiff-core" name = "objdiff-core"
version = "2.0.0-beta.6" version = "2.0.0-beta.7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"arm-attr", "arm-attr",
@ -2947,7 +2947,7 @@ dependencies = [
[[package]] [[package]]
name = "objdiff-gui" name = "objdiff-gui"
version = "2.0.0-beta.6" version = "2.0.0-beta.7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",

View File

@ -10,3 +10,11 @@ resolver = "2"
inherits = "release" inherits = "release"
lto = "thin" lto = "thin"
strip = "debuginfo" strip = "debuginfo"
[workspace.package]
version = "2.0.0-beta.7"
authors = ["Luke Street <luke@street.dev>"]
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/encounter/objdiff"
rust-version = "1.74"

View File

@ -1,11 +1,11 @@
[package] [package]
name = "objdiff-cli" name = "objdiff-cli"
version = "2.0.0-beta.6" version.workspace = true
edition = "2021" edition.workspace = true
rust-version = "1.70" rust-version.workspace = true
authors = ["Luke Street <luke@street.dev>"] authors.workspace = true
license = "MIT OR Apache-2.0" license.workspace = true
repository = "https://github.com/encounter/objdiff" repository.workspace = true
readme = "../README.md" readme = "../README.md"
description = """ description = """
A local diffing tool for decompilation projects. A local diffing tool for decompilation projects.

View File

@ -1,15 +1,16 @@
[package] [package]
name = "objdiff-core" name = "objdiff-core"
version = "2.0.0-beta.6" version.workspace = true
edition = "2021" edition.workspace = true
rust-version = "1.70" rust-version.workspace = true
authors = ["Luke Street <luke@street.dev>"] authors.workspace = true
license = "MIT OR Apache-2.0" license.workspace = true
repository = "https://github.com/encounter/objdiff" repository.workspace = true
readme = "../README.md" readme = "../README.md"
description = """ description = """
A local diffing tool for decompilation projects. A local diffing tool for decompilation projects.
""" """
documentation = "https://docs.rs/objdiff-core"
[lib] [lib]
crate-type = ["cdylib", "rlib"] crate-type = ["cdylib", "rlib"]

View File

@ -1,11 +1,11 @@
[package] [package]
name = "objdiff-gui" name = "objdiff-gui"
version = "2.0.0-beta.6" version.workspace = true
edition = "2021" edition.workspace = true
rust-version = "1.70" rust-version.workspace = true
authors = ["Luke Street <luke@street.dev>"] authors.workspace = true
license = "MIT OR Apache-2.0" license.workspace = true
repository = "https://github.com/encounter/objdiff" repository.workspace = true
readme = "../README.md" readme = "../README.md"
description = """ description = """
A local diffing tool for decompilation projects. A local diffing tool for decompilation projects.