Skip to content

Commit 3d2236d

Browse files
committed
Use workspace keys in Cargo.toml
1 parent bcc5871 commit 3d2236d

File tree

6 files changed

+36
-29
lines changed

6 files changed

+36
-29
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ jobs:
3232
set -eou pipefail
3333
tag='${{github.ref}}'
3434
tag="${tag#refs/tags/}"
35-
for file in */Cargo.toml; do
36-
version=$(grep '^version' $file | head -1 | awk -F' = ' '{print $2}' | tr -d '"')
37-
version="v$version"
38-
if [ "$tag" != "$version" ]; then
39-
echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)"
40-
exit 1
41-
fi
42-
done
35+
version=$(grep '^version' Cargo.toml | head -1 | awk -F' = ' '{print $2}' | tr -d '"')
36+
version="v$version"
37+
if [ "$tag" != "$version" ]; then
38+
echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)"
39+
exit 1
40+
fi
4341
- name: Setup Rust toolchain
4442
uses: dtolnay/rust-toolchain@stable
4543
with:

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ resolver = "2"
1010
inherits = "release"
1111
lto = "thin"
1212
strip = "debuginfo"
13+
14+
[workspace.package]
15+
version = "2.0.0-beta.7"
16+
authors = ["Luke Street <[email protected]>"]
17+
edition = "2021"
18+
license = "MIT OR Apache-2.0"
19+
repository = "https://github.com/encounter/objdiff"
20+
rust-version = "1.74"

objdiff-cli/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "objdiff-cli"
3-
version = "2.0.0-beta.6"
4-
edition = "2021"
5-
rust-version = "1.70"
6-
authors = ["Luke Street <[email protected]>"]
7-
license = "MIT OR Apache-2.0"
8-
repository = "https://github.com/encounter/objdiff"
3+
version.workspace = true
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
authors.workspace = true
7+
license.workspace = true
8+
repository.workspace = true
99
readme = "../README.md"
1010
description = """
1111
A local diffing tool for decompilation projects.

objdiff-core/Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
[package]
22
name = "objdiff-core"
3-
version = "2.0.0-beta.6"
4-
edition = "2021"
5-
rust-version = "1.70"
6-
authors = ["Luke Street <[email protected]>"]
7-
license = "MIT OR Apache-2.0"
8-
repository = "https://github.com/encounter/objdiff"
3+
version.workspace = true
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
authors.workspace = true
7+
license.workspace = true
8+
repository.workspace = true
99
readme = "../README.md"
1010
description = """
1111
A local diffing tool for decompilation projects.
1212
"""
13+
documentation = "https://docs.rs/objdiff-core"
1314

1415
[lib]
1516
crate-type = ["cdylib", "rlib"]

objdiff-gui/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "objdiff-gui"
3-
version = "2.0.0-beta.6"
4-
edition = "2021"
5-
rust-version = "1.70"
6-
authors = ["Luke Street <[email protected]>"]
7-
license = "MIT OR Apache-2.0"
8-
repository = "https://github.com/encounter/objdiff"
3+
version.workspace = true
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
authors.workspace = true
7+
license.workspace = true
8+
repository.workspace = true
99
readme = "../README.md"
1010
description = """
1111
A local diffing tool for decompilation projects.

0 commit comments

Comments
 (0)