-
Notifications
You must be signed in to change notification settings - Fork 201
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
auto version
to return the next version number
#1490
Comments
auto version
to return the next version number
you can actually get that information by doing
To me this seems like a place where you could write a plugin for |
@sherifkayad does this work for you? |
@hipstersmoothie The command We are currently checking if probably a plugin would make sense and how we can contribute it back if we did it. |
@hipstersmoothie Should ✔ success Would have created prerelease version: 0.0.2-next.0 although in my case 0.0.2-next.1 is already existing On master it seems to work though: ⚠ warning Published version would be: 0.0.2 |
The dry-run output is admittedly a little stupid and doesn't actually call to plugin code so the results might not be 100% accurate. What is your use case that you're trying to accomplish? |
The goal is to use this version to bump a Helm Chart Since it does not work, I am currently doing something like (after auto shipit)
|
@hipstersmoothie I tried using So right now, I can't use that route to get the version number for the docker image published by I can work around this for (pre-)releases by running Which is fine, but means that we have releases in Github even if we could not deploy that code. This can be a good compromise for now, until I have time to wrap up the serverless framework deploy with a publishing plugin |
Okay. All this information is great and is really pushing me to resolve #1443. This might be a bit of work and won't land for around a month. But I want to move most of the dry-run "guess release version" code into plugins. This will need a breaking change so I'll probably also do some v10 renaming work. Thanks for your guys input! The only idea I have for now to get the actual release version would be to make a plugin that taps |
Thanks for letting us know :) For now, the route of first releasing and then reading from the package.json does the job. |
@sherifkayad @msonnleitner Could you test and see if v10 solves your issues? |
OK so it seems that it works with Node 14, but I had Node 15 installed, so it seem that for node 15:
|
@hipstersmoothie Well given that I am not that experienced with Node and version switches, it is probably my fault. But for Node 14 it worked using NPM. It tried to debug it and it seemed that But basically it works, probably just my fault. |
That definitely seem like a bug on |
ok, it seems it is this issue npm/cli#1973 |
@hipstersmoothie works like a charm! Thanks for that |
🚀 Issue was released in |
Is your feature request related to a problem? Please describe.
I guess the answer to that is yes. We are trying to use auto to generate releases from our Jenkins and eventually we want to know what the exact published release is (e.g. v1.1.1). The reason behind that is that we developed some custom tool that based on a release tag / branch can generate some information about the release and link that to our internal documentation platform.
Describe the solution you'd like
Would be great to keep utilizing the command:
auto version
But instead of only getting
patch
,minor
ormajor
, maybe this time with a special flag we can get the real version number to be released e.g.:auto version --next-release-version
Describe alternatives you've considered
The only alternative for us in the meantime is to do a
grep
on the outcome of theauto release -d
command and do some ugly string concatenation e.g.:auto release -d | grep -Po ' Would have created a release on GitHub for version: \K[^ ]+'
The text was updated successfully, but these errors were encountered: