ok/jj
1
0
Fork 0
forked from mirrors/jj

cargo: explicitly indicate paths to publish

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`
(https://github.com/rust-lang/cargo/issues/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.
This commit is contained in:
Martin von Zweigbergk 2024-04-14 15:27:23 -07:00 committed by Martin von Zweigbergk
parent 955c9bf27b
commit 8ce099470b
3 changed files with 24 additions and 0 deletions

View file

@ -13,6 +13,18 @@ repository = { workspace = true }
documentation = { workspace = true }
keywords = { workspace = true }
include = [
"/LICENSE",
"/build.rs",
"/examples/",
"/src/",
"/testing/",
"/tests/",
"!*.pending-snap",
"!*.snap*",
"/tests/cli-reference@.md.snap"
]
[[bin]]
name = "jj"
path = "src/main.rs"

View file

@ -12,6 +12,16 @@ repository = { workspace = true }
documentation = { workspace = true }
readme = { workspace = true }
include = [
"/LICENSE",
"/benches/",
"/src/",
"/tests/",
"!*.pending-snap",
"!*.snap*",
]
[[test]]
name = "runner"

View file

@ -11,6 +11,8 @@ repository = { workspace = true }
documentation = { workspace = true }
readme = { workspace = true }
include = ["/LICENSE", "/src/"]
[lib]
proc-macro = true