Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Previously staged bump and changelog should be committed on subsequent execution #557

Open
mentAl-maZe opened this issue Mar 2, 2020 · 2 comments

Comments

@mentAl-maZe
Copy link

mentAl-maZe commented Mar 2, 2020

Steps to reproduce:
Starting from v1.0.0 with a previous feature commit

$ npx standard-version --skip.commit --skip.tag`
✔ bumping version in package.json from 1.0.0 to 1.1.0
✔ outputting changes to CHANGELOG.md
$ npx standard-version --skip.bump --skip.changelog`
✔ committing %s
✔ tagging release v1.1.0
ℹ Run `git push --follow-tags origin test/standard-version` to publish

Or with intermittent steps:

$ npx standard-version --skip.commit --skip.tag`
✔ bumping version in package.json from 1.0.0 to 1.1.0
✔ outputting changes to CHANGELOG.md
$ echo "test" | tee newFile.txt && git add newFile.txt
test
$ npx standard-version --skip.bump --skip.changelog --commit-all`
✔ committing all staged files and %s
✔ tagging release v1.1.0
ℹ Run `git push --follow-tags origin test/standard-version` to publish

Notice:

  • ✔ committing %s in the first example
  • ✔ committing all staged files and %s in the second example

Expected:
Previously staged files are committed with automatic commit message and tagged after commit.

Actual:
Nothing is committed, files remain staged, tag is applied to HEAD

@mentAl-maZe
Copy link
Author

Workaround:

Stage changelog on second execution with --commit-all flag

$ npx standard-version --skip.commit --skip.tag --skip.changelog
✔ bumping version in package.json from 1.0.0 to 1.1.0
$ echo "test" | tee newFile.txt && git add newFile.txt
test
$ npx standard-version --skip.bump --commit-all
✔ outputting changes to CHANGELOG.md
✔ committing CHANGELOG.md and all staged files
husky > pre-commit (node v10.16.0)
No staged files match any of provided globs.
husky > commit-msg (node v10.16.0)

✔ tagging release v1.1.0
ℹ Run `git push --follow-tags origin test/standard-version` to publish

@muhammad-saleh
Copy link

I have the same issue, I'm trying to first create a draft release and manually edit the changelog if needed and then commit and push the release in a separate step.
The output from my draft release step (standard-version --skip.tag --skip.commit) is not committed at all when running:

standard-version --skip.tag --skip.changelog --skip.bump --commit-all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants