Skip to content

Commit

Permalink
Simplify Cargo metadata for publish = false crates (#181)
Browse files Browse the repository at this point in the history
As of Cargo 1.75 the `version` property in `Cargo.toml` is now optional,
and if omitted is the same as having specified `version = "0.0.0"` and
`publish = false`:
https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-175-2023-12-28
https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field

Therefore for crates that we do not publish, we can now remove both
the `version` and `publish` properties, avoiding the need for the fake
`0.0.0` version that differs from the actual buildpack version in
`buildpack.toml`.

GUS-W-14821120.
  • Loading branch information
edmorley authored Jan 15, 2024
1 parent 6a744a5 commit 984b5bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/.idea
.DS_Store
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
[package]
name = "languages-github-actions"
description = "GitHub Actions for the Languages Team"
version = "0.0.1"
repository = "https://github.com/heroku/languages-github-actions.git"
rust-version = "1.74"
rust-version = "1.75"
edition = "2021"
publish = false

[[bin]]
name = "actions"
Expand Down

0 comments on commit 984b5bc

Please sign in to comment.