Skip to content

Commit 04b9ca0

Browse files
committed
Adjust all changelogs to fulfil requirements for publishing (#198)
1 parent 0f5f47d commit 04b9ca0

20 files changed

+66
-13
lines changed

cargo-smart-release/src/command/release/manifest.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ pub(in crate::command::release_impl) fn edit_version_and_fixup_dependent_crates_
264264
logs.iter().map(|p| p.name.as_str()).collect::<Vec<_>>().join(", ");
265265
if skip_publish {
266266
log::warn!(
267-
"Please consider creating changelog entries for crate(s) {}",
267+
"Please consider creating changelog entries for crate{}: {}",
268+
if logs.len() == 1 { "" } else { "s" },
268269
names_of_crates_in_need_of_changelog_entry
269270
);
270271
None
@@ -310,12 +311,17 @@ pub(in crate::command::release_impl) fn edit_version_and_fixup_dependent_crates_
310311
let names_of_crates_that_would_need_review =
311312
comma_separated_crate_names(&changelog_ids_with_statistical_segments_only);
312313
log::warn!(
313-
"WOULD {} as the changelog entry is empty for crates {}",
314+
"WOULD {} as the changelog entry is empty for crate{}: {}",
314315
if skip_publish {
315316
"ask for review after commit"
316317
} else {
317318
"stop release after commit"
318319
},
320+
if changelog_ids_with_statistical_segments_only.len() == 1 {
321+
""
322+
} else {
323+
"s"
324+
},
319325
names_of_crates_that_would_need_review
320326
);
321327
if !changelog_ids_probably_lacking_user_edits.is_empty() {

cargo-smart-release/tests/snapshots/triple-depth-workspace/a-b-dry-run-success-multi-crate-unconditional

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[INFO ] Pending 'c' manifest version update: "8.1.0"
1414
[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
1515
[INFO ] WOULD persist changes to 3 manifests and 2 changelogs with: "Bump a v0.9.0, b v0.9.0, safety bump c v8.1.0"
16-
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates a, b
16+
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates: a, b
1717
[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.9.0, b v0.9.0, safety bump c v8.1.0"
1818
[INFO ] WOULD create tag a-v0.9.0
1919
[INFO ] WOULD create tag b-v0.9.0

cargo-smart-release/tests/snapshots/triple-depth-workspace/a-b-dry-run-success-unconditional

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[INFO ] Pending 'c' manifest version update: "8.1.0"
1212
[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
1313
[INFO ] WOULD persist changes to 3 manifests and 1 changelogs with: "Bump a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
14-
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates a
14+
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
1515
[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
1616
[INFO ] WOULD create tag a-v0.9.0
1717
[INFO ] Congratulations for the new release of 'b' 🎉
@@ -21,6 +21,6 @@
2121
[INFO ] Pending 'c' manifest version update: "8.1.0"
2222
[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
2323
[INFO ] WOULD persist changes to 2 manifests and 1 changelogs with: "Bump b v0.9.0, safety bump c v8.1.0"
24-
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates b
24+
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: b
2525
[INFO ] WOULD run "git" "commit" "-am" "Bump b v0.9.0, safety bump c v8.1.0"
2626
[INFO ] WOULD create tag b-v0.9.0

cargo-smart-release/tests/snapshots/triple-depth-workspace/a-dry-run-success

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
[INFO ] WOULD prepare release of a v0.8.0
88
[INFO ] WOULD edit existing changelog for 'a'
99
[INFO ] WOULD persist changes to 1 manifests and 1 changelogs with: "Bump a v0.8.0"
10-
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates a
10+
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
1111
[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.8.0"
1212
[INFO ] WOULD create tag a-v0.8.0

cargo-smart-release/tests/snapshots/triple-depth-workspace/a-dry-run-success-multi-crate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
[INFO ] WOULD prepare releases of a v0.8.0
77
[INFO ] WOULD edit existing changelog for 'a'
88
[INFO ] WOULD persist changes to 1 manifests and 1 changelogs with: "Bump a v0.8.0"
9-
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates a
9+
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
1010
[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.8.0"
1111
[INFO ] WOULD create tag a-v0.8.0

cargo-smart-release/tests/snapshots/triple-depth-workspace/a-dry-run-success-multi-crate-auto-bump-no-change

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
[INFO ] WOULD prepare releases of a v0.8.0
88
[INFO ] WOULD edit existing changelog for 'a'
99
[INFO ] WOULD persist changes to 1 manifests and 1 changelogs with: "Bump a v0.8.0"
10-
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates a
10+
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
1111
[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.8.0"
1212
[INFO ] WOULD create tag a-v0.8.0

cargo-smart-release/tests/snapshots/triple-depth-workspace/a-dry-run-success-multi-crate-unconditional

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
[INFO ] Pending 'c' manifest version update: "8.1.0"
1111
[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
1212
[INFO ] WOULD persist changes to 3 manifests and 1 changelogs with: "Bump a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
13-
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates a
13+
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
1414
[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
1515
[INFO ] WOULD create tag a-v0.9.0

cargo-smart-release/tests/snapshots/triple-depth-workspace/a-dry-run-success-unconditional

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
[INFO ] Pending 'c' manifest version update: "8.1.0"
1111
[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
1212
[INFO ] WOULD persist changes to 3 manifests and 1 changelogs with: "Bump a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
13-
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates a
13+
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
1414
[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
1515
[INFO ] WOULD create tag a-v0.9.0

cargo-smart-release/tests/snapshots/triple-depth-workspace/c-dry-run-success-multi-crate-auto-bump-breaking-change

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
[INFO ] WOULD edit existing changelog for 'b'
1919
[INFO ] WOULD create a new changelog for 'c'
2020
[INFO ] WOULD persist changes to 3 manifests and 3 changelogs (1 new) with: "Bump a v0.8.0, b v0.8.0, c v8.0.0"
21-
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates a, b
21+
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates: a, b
2222
[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.8.0, b v0.8.0, c v8.0.0"
2323
[INFO ] WOULD create tag a-v0.8.0
2424
[INFO ] WOULD create tag b-v0.8.0

cargo-smart-release/tests/snapshots/triple-depth-workspace/c-dry-run-success-multi-crate-auto-bump-minor-change

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
[INFO ] WOULD edit existing changelog for 'b'
1919
[INFO ] WOULD create a new changelog for 'c'
2020
[INFO ] WOULD persist changes to 3 manifests and 3 changelogs (1 new) with: "Bump a v0.8.0, b v0.8.0, c v8.0.0"
21-
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates a, b
21+
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates: a, b
2222
[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.8.0, b v0.8.0, c v8.0.0"
2323
[INFO ] WOULD create tag a-v0.8.0
2424
[INFO ] WOULD create tag b-v0.8.0

0 commit comments

Comments
 (0)