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.

All packages in repo get version bump for every commit, even irrelevant ones

See original GitHub issue

We have multiple projects inside a repo for all of our shared code that we use to build Nuget packages from (one Nuget package per project). I just started using this project for versioning all of our packages and really liking it so far - thanks for the awesome work!

The one thing I’d like to improve is how to get the Git Height working well for multiple projects. Right now, if we make changes to one project (say 6 commits in one folder for the one project) then it will result in the version number being bumped up by 6 for all of our projects: image This makes it hard to know when to update our project dependencies as it’s unclear whether it’s actually a new package or not.

Of course, this makes sense based on how the version is calculated, but I was wondering if there is a way to have this be based on the folder/project without having to move to separate git repos for each project. We currently have a version.json file per project so it would be neat if the git height could be calculated from the location of the version.json file down or something like that. Any suggestions on how to do this better?

Issue Analytics

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

github_iconTop GitHub Comments

12reactions
AArnottcommented, Sep 14, 2018

CALL FOR VOTE

Consider a situation of projects A and B, where A references B. B is changed. What should happen to A’s version?

Please thumbs up this particular message if and only if: A should experience a version bump.

Please thumbs down this particular message if you do not expect A to experience a version bump.

IMO, if B is a packaged project of its own, I can see an argument where A needn’t be incremented (although it means installing A will give you an older version of B). But if B is not a packaged project, it seems paramount that A’s version is incremented or else the change to B will never ship.

1reaction
herebebeastiescommented, Sep 9, 2019

I think it should be opt-in, not opt-out, as it’s bound to result in version numbers going backwards when added, otherwise.

Newer SDK-style projects probably save us a bit, in that at least they don’t thrash their file contents so much.

Totally agree on the caching aspect, as I mentioned - it needs to be fast enough full stop. To that end, I don’t think doing a design-time build is the way to go. I’m aware of all the subtleties of not doing that (Directory.build.props files that might themselves have imports driven by variables or whatever other clever people are using) but there are subtleties the other way around, too.

For example, what if a project reference is conditionally included based on target framework? You could end up with a different (divergent) version number per framework, which doesn’t sound like what you’d want. Better to just treat all transitive imports/refs as if they’re unconditional IMO.

My team has some experience here, so we’ll look into it all a bit further and let you know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

All packages in repo get version bump for every commit, ...
We have multiple projects inside a repo for all of our shared code that we use to build Nuget packages from (one Nuget...
Read more >
How to avoid keeping version number in source code?
Since the version number is stored in a file in the git repo, every increase of the version number is a new commit....
Read more >
Bump version before kicking off new development or when ...
Every commit automatically increments the version number. · A version can be made a ".0" release by simply tagging it. · Though not...
Read more >
Let's Automate Version Number Updates - NOT!
Say you need to update (bump) your software. It's currently at version 1.2, all ... Change the version in one file, commit, tag,...
Read more >
How to use GitVersion to get sensible versioning
So let's create a dedicated branch to build the next version on and then re-run ... a part of the version increments with...
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