question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

prebump script with informational output causes version bump failure

See original GitHub issue

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 the prebump 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:

✔ Running lifecycle script "prebump"
ℹ - execute command: "sh build/apidocs.sh"
✔ bumping version in package.json from 4.4.0 to null
✔ bumping version in package-lock.json from 4.4.0 to null

It then failed at the tagging step because v4.4.0 already exists. Looking at the code it appears that any output in the prebump script is parsed as a version number, meaning that my original assumption was incorrect and preversion does not map to prebump.

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 in prebump seems feasible but kludgey; I think what’s called for here is a separate lifecycle event (prerelease maybe?) which would be an actual analogue to preversion and run before prebump.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
WilcoFierscommented, May 23, 2018

Thanks @dmfay 😃

0reactions
dmfaycommented, May 22, 2018

All good – I released version 4.8.3 with standard-version and the script fired as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto-script GUI Root+Bump+TWRP for LG G3 | Page 9 | XDA Forums
Hi @briefer, I can't help troubleshoot with just a message/post saying "it's broken..." :) A lot of things can cause problems, so the...
Read more >
Bump - Commitizen
The version is bumped automatically based on the commits. The commits should follow the rules of the committer to be parsed correctly.
Read more >
What characterizes the reminiscence bump in ... - Springer Link
The reminiscence bump represents one of the most robust findings in autobiographical memory research. As such, it has led to a number of ......
Read more >
MATE 1.22 released - MATE Desktop Environment
d3261c1 Update dropbox.py with shmodel, proxy, and throttle features. a2ccaaf update Copyright year; 394578f pre-bump version. caja-extensions.
Read more >
bumped flip chip: Topics by Science.gov
The test results and the failure modes are discussed in detail. ... and was a dominant component causing the plastic deformation of Cu/SnAg...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found