Skip to content

Commit

Permalink
cargo: explicitly indicate paths to publish
Browse files Browse the repository at this point in the history
Running `cargo publish` from a non-colocated repo (such as my usual
repo) is currently quite scary because it uploads all non-hidden
files, even if they're ignored by `.gitignore`
(rust-lang/cargo#2063). I noticed this a
while ago and have always run the command from a fresh clone since
then. To avoid the need for that, let's use the workaround mentioned
on the bug, which is to explicitly list patterns we want to publish.
  • Loading branch information
martinvonz committed Apr 14, 2024
1 parent 2738486 commit 0b1457d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ repository = { workspace = true }
documentation = { workspace = true }
keywords = { workspace = true }

include = ["/LICENSE", "/examples/", "/src/", "/testing/", "/tests/"]

[[bin]]
name = "jj"
path = "src/main.rs"
Expand Down
2 changes: 2 additions & 0 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ repository = { workspace = true }
documentation = { workspace = true }
readme = { workspace = true }

include = ["/LICENSE", "/benches/", "/src/", "/tests/"]

[[test]]
name = "runner"

Expand Down
2 changes: 2 additions & 0 deletions lib/proc-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ repository = { workspace = true }
documentation = { workspace = true }
readme = { workspace = true }

include = ["/LICENSE", "/src/"]

[lib]
proc-macro = true

Expand Down

0 comments on commit 0b1457d

Please sign in to comment.