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

Major, Minor and Patch version parts as separate variables #233

Closed
petersendev opened this issue Oct 16, 2018 · 5 comments · Fixed by #235
Closed

Major, Minor and Patch version parts as separate variables #233

petersendev opened this issue Oct 16, 2018 · 5 comments · Fixed by #235
Assignees

Comments

@petersendev
Copy link

Hi, additionally to the NBGV_MajorMinorVersion I would really like to have all the version parts available as separate (environment) variables.

Since (as I understand it) the version height doesn't have to be in the patch part of the version, all three would be preferable.

I need this primarily in a cloudbuild (via nbgv cloud -c -a) for docker tags ( 0.x, 0.1.x, 0.1.2), which is currently not possible without parsing the version via script.

I would like to request the feature that nbgv would set NBGV_Major, NBGV_Minor and NBGV_Patch.

As a bonus, the NBGV_PrereleaseVersion without the leading dash would also be welcomed.

@AArnott
Copy link
Collaborator

AArnott commented Oct 16, 2018

This all sounds reasonable. I'll try to get this done over the next week or so. If someone wants to send a PR, just ping me before working on it so we can avoid double work.

@AArnott AArnott self-assigned this Oct 16, 2018
@AArnott
Copy link
Collaborator

AArnott commented Oct 19, 2018

The properties (excluding the NBGV_ prefix) are:

  1. VersionMajor
  2. VersionMinor
  3. BuildNumber (this was preexisting)
  4. VersionRevision

The BuildNumber always represents the 3rd integer in the version. If you want the version/git height specifically, use VersionHeight, since as you say that may not appear as the 3rd integer.

I've also added a PrereleaseVersionNoLeadingHyphen property for you.

@petersendev
Copy link
Author

Sounds great, thank you so much!

@petersendev
Copy link
Author

Any ETA on a release? Would love to migrate my last projects, but they are blocked by this.

@AArnott
Copy link
Collaborator

AArnott commented Nov 12, 2018

Done. It's v2.2.33 on nuget.org. If you don't see it yet, check again in an hour.

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

Successfully merging a pull request may close this issue.

2 participants