-
Notifications
You must be signed in to change notification settings - Fork 800
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
prebump script with informational output causes version bump failure #217
Comments
@dmfay 👋 sorry for the slow reply; digging myself out of a backlog of 1,000,000 GitHub issues. I'd love some help figuring out the optimal solution to your issues; be it introducing more docs, perhaps changing the logic around parsing the version # output by prebump (like you suggest). I'm a little hesitant to add more lifecycle scripts, just in the name of keeping things simple ... but I could have my mind changed 😄 |
tldr; this sounds like a great first contribution to the project if you're at all interested. |
no worries! The specific task I'm trying to accomplish before cutting a new version is to make sure the automated API docs are up to date. The steps required are:
|
@dmfay please try |
All good -- I released version 4.8.3 with standard-version and the script fired as expected. |
Thanks @dmfay :-) |
This seems to be more appropriate ref. conventional-changelog/standard-version#217
I have an existing project I'm interested in using with standard-version. The catch is that it has a
preversion
script which runs JSDoc and commits updated API documentation before release; after going through the standard-version docs, I thought theprebump
hook seemed analogous and made the appropriate changes. A dry run showed a proper changelog and the expected bump from 4.4.0 to 4.5.0. However, actually cutting a release did this instead:It then failed at the tagging step because
v4.4.0
already exists. Looking at the code it appears that any output in theprebump
script is parsed as a version number, meaning that my original assumption was incorrect andpreversion
does not map toprebump
.I think at minimum the docs could be clearer about this: the example
prebump
script echoes a version number, but the language "returns a version #" is a bit unclear in the context of a script and there's nothing indicating that all of stdout is being parsed. I'm actually interested in my script's output so I don't want to pipe everything to /dev/null, and parsing just the last line inprebump
seems feasible but kludgey; I think what's called for here is a separate lifecycle event (prerelease
maybe?) which would be an actual analogue topreversion
and run beforeprebump
.The text was updated successfully, but these errors were encountered: