Skip to content

version returned from prebump lifecycle script not being used #185

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

Closed
singh-inder opened this issue Sep 13, 2024 · 1 comment · Fixed by #186
Closed

version returned from prebump lifecycle script not being used #185

singh-inder opened this issue Sep 13, 2024 · 1 comment · Fixed by #186
Labels
bug Something isn't working

Comments

@singh-inder
Copy link

singh-inder commented Sep 13, 2024

Describe the bug
In the prebump lifecycle script , it is mentioned that if a version is returned from script, that version will be used.

Current behavior
version returned from prebump lifecycle script is not being used.

Expected behavior
version returned from prebump lifecycle script should be used.

Environment

  • commit-and-tag-version version(s): v12.4.3
  • Node/npm version: node 22.4
  • OS: Windows 10

Additional context
image

@singh-inder
Copy link
Author

singh-inder commented Sep 13, 2024

so after taking a look at the codebase, found that when --dry-run is enabled, scripts are not executed. Makes sense.
So I tried running without --dry-run and found the problem. I used npm pkg get version command in prebump script. This returned value in double quotes, For example, '"1.0.0"' and when this value is passed in semver.valid method Here, it returned null. PR #186 fixes this.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant