Skip to content

Commit

Permalink
--no-changelog-preview isn't needed anymore in dry-run mode (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Oct 16, 2021
1 parent aff053f commit 1b6a4ad
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 13 deletions.
26 changes: 13 additions & 13 deletions cargo-smart-release/tests/journey.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ title "smart-release"
(with "'c'"
(with '-d minor to bump minor dependencies'
it "succeeds" && {
expect_run $SUCCESSFULLY "$exe" smart-release c -d minor -b keep --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release c -d minor -b keep
}
)
)
Expand All @@ -83,54 +83,54 @@ title "smart-release"
(with 'explicit bump specification'
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/a-dry-run-success-multi-crate" \
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --allow-dirty -b minor --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --allow-dirty -b minor
}
(with '--no-multi-crate-release'
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/a-dry-run-success" \
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --no-multi-crate-release -b minor --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --no-multi-crate-release -b minor
}
)
)
(with 'implicit bump specification derived from commit history'
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/a-dry-run-success-multi-crate-auto-bump-no-change" \
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --allow-dirty --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --allow-dirty
}
(with "a breaking change"
(cd a && touch break && git add break && git commit -m "refactor!: break") &>/dev/null
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/a-dry-run-success-multi-crate-auto-bump-breaking-change" \
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --allow-dirty --no-changelog-preview --allow-fully-generated-changelogs
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --allow-dirty --allow-fully-generated-changelogs
}
git reset --hard HEAD~1 &>/dev/null
)
(with "a new feature"
(cd a && touch feat && git add feat && git commit -m "feat: new") &>/dev/null
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/a-dry-run-success-multi-crate-auto-bump-minor-change" \
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --allow-dirty --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --allow-dirty
}
git reset --hard HEAD~1 &>/dev/null
)
(when 'releasing "c" as well'
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/c-dry-run-success-multi-crate-auto-bump-no-change" \
expect_run $SUCCESSFULLY "$exe" smart-release c a --no-push --no-publish -v --allow-dirty --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release c a --no-push --no-publish -v --allow-dirty
}
(with "a breaking change"
(cd c && touch break && git add break && git commit -m "refactor!: break") &>/dev/null
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/c-dry-run-success-multi-crate-auto-bump-breaking-change" \
expect_run $SUCCESSFULLY "$exe" smart-release c a --no-push --no-publish -v --allow-dirty --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release c a --no-push --no-publish -v --allow-dirty
}
git reset --hard HEAD~1 &>/dev/null
)
(with "a new feature"
(cd c && touch feat && git add feat && git commit -m "feat: new") &>/dev/null
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/c-dry-run-success-multi-crate-auto-bump-minor-change" \
expect_run $SUCCESSFULLY "$exe" smart-release c a --no-push --no-publish -v --allow-dirty --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release c a --no-push --no-publish -v --allow-dirty
}
git reset --hard HEAD~1 &>/dev/null
)
Expand All @@ -140,23 +140,23 @@ title "smart-release"
(with 'unconditional version bumping'
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/a-dry-run-success-multi-crate-unconditional" \
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --no-bump-on-demand -b minor --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --no-bump-on-demand -b minor
}
(with '--no-multi-crate-release'
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/a-dry-run-success-unconditional" \
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --no-multi-crate-release --no-bump-on-demand -b minor --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release a --no-push --no-publish -v --no-multi-crate-release --no-bump-on-demand -b minor
}
)
(when 'releasing b as well'
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/a-b-dry-run-success-multi-crate-unconditional" \
expect_run $SUCCESSFULLY "$exe" smart-release b a --no-push --no-publish -v --no-bump-on-demand -b minor --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release b a --no-push --no-publish -v --no-bump-on-demand -b minor
}
(with '--no-multi-crate-release'
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/a-b-dry-run-success-unconditional" \
expect_run $SUCCESSFULLY "$exe" smart-release b a --no-push --no-publish -v --no-multi-crate-release --no-bump-on-demand -b minor --no-changelog-preview
expect_run $SUCCESSFULLY "$exe" smart-release b a --no-push --no-publish -v --no-multi-crate-release --no-bump-on-demand -b minor
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[INFO ] Pending 'c' manifest version update: "8.1.0"
[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
[INFO ] WOULD persist changes to 3 manifests and 2 changelogs with: "Adjusting changelogs prior to release of a v0.9.0, b v0.9.0, safety bump c v8.1.0"
[INFO ] Up to 2 changelogs would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates: a, b
[WARN ] To fix the changelog manually, run: cargo changelog --write --only a
[WARN ] To fix the changelog manually, run: cargo changelog --write --only b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[INFO ] Pending 'c' manifest version update: "8.1.0"
[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
[INFO ] WOULD persist changes to 3 manifests and 1 changelogs with: "Adjusting changelogs prior to release of a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
[INFO ] Up to 1 changelog would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
[WARN ] To fix the changelog manually, run: cargo changelog --write --only a
[INFO ] WOULD run "git" "commit" "-am" "Adjusting changelogs prior to release of a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
Expand All @@ -22,6 +23,7 @@
[INFO ] Pending 'c' manifest version update: "8.1.0"
[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
[INFO ] WOULD persist changes to 2 manifests and 1 changelogs with: "Adjusting changelogs prior to release of b v0.9.0, safety bump c v8.1.0"
[INFO ] Up to 1 changelog would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: b
[WARN ] To fix the changelog manually, run: cargo changelog --write --only b
[INFO ] WOULD run "git" "commit" "-am" "Adjusting changelogs prior to release of b v0.9.0, safety bump c v8.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[INFO ] Congratulations for the new release of 'a' 🎉
[INFO ] WOULD modify existing changelog for 'a'.
[INFO ] WOULD persist changes to 1 manifests and 1 changelogs with: "Adjusting changelogs prior to release of a v0.8.0"
[INFO ] Up to 1 changelog would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
[WARN ] To fix the changelog manually, run: cargo changelog --write --only a
[INFO ] WOULD run "git" "commit" "-am" "Adjusting changelogs prior to release of a v0.8.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[INFO ] Congratulations for the new release of 'a' 🎉
[INFO ] WOULD modify existing changelog for 'a'.
[INFO ] WOULD persist changes to 1 manifests and 1 changelogs with: "Adjusting changelogs prior to release of a v0.8.0"
[INFO ] Up to 1 changelog would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
[WARN ] To fix the changelog manually, run: cargo changelog --write --only a
[INFO ] WOULD run "git" "commit" "-am" "Adjusting changelogs prior to release of a v0.8.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[INFO ] Congratulations for the new release of 'a' 🎉
[INFO ] WOULD modify existing changelog for 'a'.
[INFO ] WOULD persist changes to 1 manifests and 1 changelogs with: "Adjusting changelogs prior to release of a v0.8.0"
[INFO ] Up to 1 changelog would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] This changelog is likely to be fully generated from commit history or contain lower-case git-conventional headlines: a
[INFO ] WOULD run "git" "commit" "-am" "Adjusting changelogs prior to release of a v0.8.0"
[INFO ] WOULD prepare releases of a v0.8.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[INFO ] Congratulations for the new release of 'a' 🎉
[INFO ] WOULD modify existing changelog for 'a'.
[INFO ] WOULD persist changes to 1 manifests and 1 changelogs with: "Bump a v0.8.0"
[INFO ] Up to 1 changelog would be previewed if the --execute is set and --no-changelog-preview is unset.
[INFO ] WOULD run "git" "commit" "-am" "Bump a v0.8.0"
[INFO ] WOULD prepare releases of a v0.8.0
[INFO ] WOULD create tag object a-v0.8.0 with changelog message, first line is: '### New Features'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[INFO ] Congratulations for the new release of 'a' 🎉
[INFO ] WOULD modify existing changelog for 'a'.
[INFO ] WOULD persist changes to 1 manifests and 1 changelogs with: "Adjusting changelogs prior to release of a v0.8.0"
[INFO ] Up to 1 changelog would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
[WARN ] To fix the changelog manually, run: cargo changelog --write --only a
[INFO ] WOULD run "git" "commit" "-am" "Adjusting changelogs prior to release of a v0.8.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[INFO ] Pending 'c' manifest version update: "8.1.0"
[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
[INFO ] WOULD persist changes to 3 manifests and 1 changelogs with: "Adjusting changelogs prior to release of a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
[INFO ] Up to 1 changelog would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
[WARN ] To fix the changelog manually, run: cargo changelog --write --only a
[INFO ] WOULD run "git" "commit" "-am" "Adjusting changelogs prior to release of a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[INFO ] Pending 'c' manifest version update: "8.1.0"
[INFO ] Pending 'c' manifest dependencies update: 'b = "^0.9.0"' (from "0.8.0" )
[INFO ] WOULD persist changes to 3 manifests and 1 changelogs with: "Adjusting changelogs prior to release of a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
[INFO ] Up to 1 changelog would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crate: a
[WARN ] To fix the changelog manually, run: cargo changelog --write --only a
[INFO ] WOULD run "git" "commit" "-am" "Adjusting changelogs prior to release of a v0.9.0, safety bump 2 crates\n\nSAFETY BUMP: b v0.9.0, c v8.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
[INFO ] WOULD modify existing changelog for 'b'.
[INFO ] WOULD create a new changelog for 'c'.
[INFO ] WOULD persist changes to 3 manifests and 3 changelogs (1 new) with: "Adjusting changelogs prior to release of a v0.8.0, b v0.8.0, c v8.0.0"
[INFO ] Up to 3 changelogs would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates: a, b
[WARN ] To fix the changelog manually, run: cargo changelog --write --only a
[WARN ] To fix the changelog manually, run: cargo changelog --write --only b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
[INFO ] WOULD modify existing changelog for 'b'.
[INFO ] WOULD create a new changelog for 'c'.
[INFO ] WOULD persist changes to 3 manifests and 3 changelogs (1 new) with: "Adjusting changelogs prior to release of a v0.8.0, b v0.8.0, c v8.0.0"
[INFO ] Up to 3 changelogs would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates: a, b
[WARN ] To fix the changelog manually, run: cargo changelog --write --only a
[WARN ] To fix the changelog manually, run: cargo changelog --write --only b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
[INFO ] WOULD modify existing changelog for 'b'.
[INFO ] WOULD create a new changelog for 'c'.
[INFO ] WOULD persist changes to 3 manifests and 3 changelogs (1 new) with: "Adjusting changelogs prior to release of a v0.8.0, b v0.8.0, c v8.0.0"
[INFO ] Up to 3 changelogs would be previewed if the --execute is set and --no-changelog-preview is unset.
[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates: a, b, c
[WARN ] To fix the changelog manually, run: cargo changelog --write --only a
[WARN ] To fix the changelog manually, run: cargo changelog --write --only b
Expand Down

0 comments on commit 1b6a4ad

Please sign in to comment.