History

smart-release: improved safety bump log message (#197)

Sebastian Thiel committed 5 years ago

Commit 9b78c341 parent 2b554274 files · +15 −7Browse files

Unified · Split

4 files
  1. cargo-smart-release/src/command/release/manifest.rs +9 −1
  2. cargo-smart-release/tests/snapshots/triple-depth-workspace/a-b-dry-run-success-unconditional +2 −2
  3. cargo-smart-release/tests/snapshots/triple-depth-workspace/a-dry-run-success-multi-crate-unconditional +2 −2
  4. cargo-smart-release/tests/snapshots/triple-depth-workspace/a-dry-run-success-unconditional +2 −2
cargo-smart-release/src/command/release/manifest.rs+9−1
@@ -86,7 +86,15 @@ pub(in crate::command::release_impl) fn edit_version_and_fixup_dependent_crates< · 85 unmodified lines
86 if safety_bumped_packages.is_empty() {86 if safety_bumped_packages.is_empty() {
87 Cow::from("")87 Cow::from("")
88 } else {88 } else {
89 format!(", safety bump {}", names_and_versions(&safety_bumped_packages)).into()89 match safety_bumped_packages.len() {
90 1 => format!(", safety bump {}", names_and_versions(&safety_bumped_packages)).into(),
91 num_crates => format!(
92 ", safety bump {} crates\n\nSAFETY BUMP: {}",
93 num_crates,
94 names_and_versions(&safety_bumped_packages)
95 )
96 .into(),
97 }
90 }98 }
91 }99 }
92 );100 );
cargo-smart-release/tests/snapshots/triple-depth-workspace/a-b-dry-run-success-unconditional+2−2
@@ -9,8 +9,8 @@ · 8 unmodified lines
9[INFO ] Pending 'b' manifest dependencies update: 'a = "^0.9.0"' (from "0.8.0" )9[INFO ] Pending 'b' manifest dependencies update: 'a = "^0.9.0"' (from "0.8.0" )
10[INFO ] Pending 'c' manifest version update: "8.1.0"10[INFO ] Pending 'c' manifest version update: "8.1.0"
11[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )11[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
12[INFO ] WOULD persist changes to manifests with: "Bump a v0.9.0, safety bump b v0.9.0, c v8.1.0"12[INFO ] WOULD persist changes to manifests with: "Bump a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
13[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.9.0, safety bump b v0.9.0, c v8.1.0"13[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"
14[INFO ] WOULD create tag a-v0.9.014[INFO ] WOULD create tag a-v0.9.0
15[INFO ] Congratulations for the new release of 'b' 🎉15[INFO ] Congratulations for the new release of 'b' 🎉
16[INFO ] WOULD prepare release of b v0.9.016[INFO ] WOULD prepare release of b v0.9.0
cargo-smart-release/tests/snapshots/triple-depth-workspace/a-dry-run-success-multi-crate-unconditional+2−2
@@ -8,6 +8,6 @@ · 7 unmodified lines
8[INFO ] Pending 'b' manifest dependencies update: 'a = "^0.9.0"' (from "0.8.0" )8[INFO ] Pending 'b' manifest dependencies update: 'a = "^0.9.0"' (from "0.8.0" )
9[INFO ] Pending 'c' manifest version update: "8.1.0"9[INFO ] Pending 'c' manifest version update: "8.1.0"
10[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )10[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
11[INFO ] WOULD persist changes to manifests with: "Bump a v0.9.0, safety bump b v0.9.0, c v8.1.0"11[INFO ] WOULD persist changes to manifests with: "Bump a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
12[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.9.0, safety bump b v0.9.0, c v8.1.0"12[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"
13[INFO ] WOULD create tag a-v0.9.013[INFO ] WOULD create tag a-v0.9.0
cargo-smart-release/tests/snapshots/triple-depth-workspace/a-dry-run-success-unconditional+2−2
@@ -8,6 +8,6 @@ · 7 unmodified lines
8[INFO ] Pending 'b' manifest dependencies update: 'a = "^0.9.0"' (from "0.8.0" )8[INFO ] Pending 'b' manifest dependencies update: 'a = "^0.9.0"' (from "0.8.0" )
9[INFO ] Pending 'c' manifest version update: "8.1.0"9[INFO ] Pending 'c' manifest version update: "8.1.0"
10[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )10[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
11[INFO ] WOULD persist changes to manifests with: "Bump a v0.9.0, safety bump b v0.9.0, c v8.1.0"11[INFO ] WOULD persist changes to manifests with: "Bump a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
12[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.9.0, safety bump b v0.9.0, c v8.1.0"12[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"
13[INFO ] WOULD create tag a-v0.9.013[INFO ] WOULD create tag a-v0.9.0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t