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.

Opt out from autoincrement feature (multiple projects in a single repo)

See original GitHub issue

Use case(s)

There are times when I would like to opt out from autoincrementing feature completely and use tags by hand only.

Description

While something similar has already been asked before (#500, #519, #616), I would like to raise this issue again.

Standard scenario. Let’s say I have two projects in a single repo: Main and Extension. Extension depends on Main. I version these projects independently with MinVerTagPrefix property set for each project (main- and ext-). Let’s say latest commit tags are main-2.0.1 and ext-1.0.1.

Now if I commit something to Extension’s folder with no change to the Main folder, tag the commit with ext-1.0.2, pack the Extension project, then the resulting Extension.nuspec will reference incremenented version of Main (2.0.2-alpha.0.1), which is very much an expected behavior consistent with the docs. But the Main package hasn’t changed, and the desired Main’s version would still be 2.0.1.

What I would want to do is to have something like MinVerAutoIncrement set to ‘none’ and version everything manually - without autoincrementing, by specified tags only, as they are. In this case, any package version could be obtained from the latest tag (with the corresponding prefix) anywhere deep in commit history. So the idea is to be able to completely turn autoincrement or any automated behaviour off. If for some reason I commit changes in two folders simultaneously, I would create two tags on the commit, say, main-2.0.2 and ext-1.0.2.

In #616, @adamralph suggested MinVerLockToLastTag property, but was ‘struggling to see much benefit over manual versioning with the <Version> property’. I agree that benefit is not much, but still is. As @adamralph himself advocates using tags only, using Version properties would be an issue. The very idea of ‘tagged’ versioning in MinVer, and which I loved, is to use commit tags for both git and package versioning. And the commit tag is the only source of truth. I can roll back to any version given a tag. But there’s no convenient way to roll back if the version is specified in a file as a Version property.

As suggested by @adamralph in https://github.com/adamralph/minver/issues/500#issuecomment-860248531, I can solve this by adding and removing MinVerVersionOverride in the Main project, but frankly it’s an overkill 😃 and it would require changing and committing Main.csproj twice, rendering MinVer useless.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
adamralphcommented, Feb 26, 2022

@TimTK17 sorry for the radio silence. I see the use case. I’m trying to think of a reason not to add this feature but I haven’t found one so far.

1reaction
TimTK17commented, Mar 30, 2022

@adamralph sorry, I was away for a while. It is indeed solved now. Thank you very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Multiple projects in one repository GitHub
You want to use a multi-repo approach and to have a project by repo in if these projects are not designed to live...
Read more >
Best practices for a single repositorie with multiple projects?
Best practices for a single repositorie with multiple projects? · Keep the code of the three components in one repo. · Have separate...
Read more >
Choosing between Single or multiple projects in a git ...
You say "one project per repository" and then you list one project (named myProject ) with multiple folders. But then you are talking...
Read more >
How to manage projects under Version Control Systems
All files under the .idea directory in the project root except the items that store user-specific settings: workspace.xml; usage.
Read more >
How to set auto-increment start in Laravel migrations?
How to set auto-increment start in Laravel migrations? · Schema::create('books', function (Blueprint $table) { $table->increments('id'); $table-> ...
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