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

Question about manually bumping commit. #1078

Open
GurdipS5 opened this issue Aug 12, 2024 · 5 comments
Open

Question about manually bumping commit. #1078

GurdipS5 opened this issue Aug 12, 2024 · 5 comments
Labels

Comments

@GurdipS5
Copy link

Hi,
I am using NBGV in an NPM project.

I am a bit confused, as I thought NBGV could automatically increase the minor version per build? I think this is how the Nuget package for .NET Core works.

So am I using this correctly to amend the version no manually before each commit?

Thanks!

@AArnott
Copy link
Collaborator

AArnott commented Aug 13, 2024

NB.GV (and the nbgv CLI tool) calculates the version based on git history. It does not increment the version for every single build. If you add a commit, the computed version is incremented automatically. No need to touch version.json in every commit for this to happen.

@GurdipS5
Copy link
Author

GurdipS5 commented Aug 20, 2024

That makes sense. However, I have my commit but there's no change in the version.json file? Maybe I am missing.

@AArnott
Copy link
Collaborator

AArnott commented Aug 20, 2024

Committing doesn't change the version.json file. But nbgv or the NB.GV nuget package will calculate a higher version for each successive commit anyway.

@GurdipS5
Copy link
Author

Yeah that makes sense.I guess that leaves my last question which is to get the higher version number, is there a command? I as looking at get-version etc.

@AArnott
Copy link
Collaborator

AArnott commented Aug 21, 2024

You get a higher version number with every commit. And if you want a number in the version to increase that is actually specified in the version.json file, you need to update the version.json file and commit the change.

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

No branches or pull requests

2 participants