replace-workspace-values.py: Update cargo.toml on only lints replace
This commit is contained in:
@@ -123,6 +123,7 @@ def main() -> None:
|
||||
and crate_manifest["lints"]["workspace"] is True
|
||||
):
|
||||
crate_manifest["lints"] = workspace_manifest["lints"]
|
||||
changed = True
|
||||
|
||||
if not changed:
|
||||
return
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "im_using_workspaces"
|
||||
version = { workspace = true }
|
||||
publish = false
|
||||
keywords = [
|
||||
"workspace",
|
||||
"other_thing",
|
||||
"third_thing",
|
||||
]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
bar = "1.0.0"
|
||||
+4
@@ -4,4 +4,8 @@ runCommand "git-dependency-workspace-inheritance-test" { } ''
|
||||
cp --no-preserve=mode ${./crate.toml} "$out"
|
||||
${replaceWorkspaceValues} "$out" ${./workspace.toml}
|
||||
diff -u "$out" ${./want.toml}
|
||||
|
||||
cp --no-preserve=mode ${./crate_lints.toml} "$out"
|
||||
${replaceWorkspaceValues} "$out" ${./workspace.toml}
|
||||
diff -u "$out" ${./want_lints.toml}
|
||||
''
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "im_using_workspaces"
|
||||
version = "1.0.0"
|
||||
publish = false
|
||||
keywords = [
|
||||
"workspace",
|
||||
"other_thing",
|
||||
"third_thing",
|
||||
]
|
||||
|
||||
[lints]
|
||||
dbg_macro = "warn"
|
||||
|
||||
[dependencies]
|
||||
bar = "1.0.0"
|
||||
+3
@@ -3,3 +3,6 @@ version = "1.0.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
foo = { version = "1.0.0", features = ["meow"] }
|
||||
|
||||
[workspace.lints]
|
||||
dbg_macro = "warn"
|
||||
|
||||
Reference in New Issue
Block a user