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

Support specific branches for tracking versions #452

Closed
GeertvanHorrik opened this issue May 29, 2015 · 9 comments
Closed

Support specific branches for tracking versions #452

GeertvanHorrik opened this issue May 29, 2015 · 9 comments

Comments

@GeertvanHorrik
Copy link
Contributor

See this problem:

image

We had quite a few discussions about this, but to solve it, something like this might solve this issue:

How about, new branch config option trackVersion: release/

Then the version will be determined based on the following rules:

  1. latest master branch tag
  2. latest release if exists (for example, trackversion config)
  3. NextVersion setting
@GeertvanHorrik
Copy link
Contributor Author

The reason this issue is being created is that commit 5, 6, 8 will never go into the 2.2.0 release, but do get the 2.2.0-unstable versioning. Another option is to manually bump nextversion in gitversionconfig.

@JakeGinnivan
Copy link
Contributor

This is the class which tracks master.

https://github.com/ParticularLabs/GitVersion/blob/master/GitVersionCore/VersionCalculation/BaseVersionCalculators/TrackMergeTargetBaseVersionStrategy.cs

Ideally we could extend this class to also track release branches, maybe even in a generic way

@GeertvanHorrik
Copy link
Contributor Author

It gets even worse. We released 2.2.0 today, then the same commit (which was already numbered 2.2.0-unstable7 (but actually should be 2.3.0-unstable1) now becomes 2.3.0-unstable1 (but it's the same commit).

@JakeGinnivan
Copy link
Contributor

See #465

I am trying to figure out how to solve this problem. Ideas are welcome

@JakeGinnivan
Copy link
Contributor

@GeertvanHorrik my PR should fix the last issue you posted about. Want to give it a spin?

@GeertvanHorrik
Copy link
Contributor Author

Definitely. I was away last week so have to catch up with all e-mail, then will look into this.

@GeertvanHorrik
Copy link
Contributor Author

Writing a unit test for this scenario.

@GeertvanHorrik
Copy link
Contributor Author

I have this graph, all seems to work fine:

* 1b187c4 (HEAD, develop) Test Commit for file '1536dbe1-d427-49fb-810e-e89e71945bb3'
* 33686bc Test Commit for file 'c3e2c8c8-3435-45e5-bd54-1cc71578ee91'
*   385aec8 Merge branch 'release/2.2.0'
|\  
* | 70d7de1 Test Commit for file '7f2c5f27-7fb9-4534-ac65-624514c87d3a'
* | 61848eb Test Commit for file '35e7cb85-e1c2-4564-96ad-ba4bb43b3cbe'
| | *   9bb3b0c (tag: 2.2.0, master) Merge branch 'release/2.2.0'
| | |\  
| | |/  
| |/|   
| * | 71c268c (release/2.2.0) Test Commit for file '2e270dc4-817e-4937-aa3f-7f31a53cfe04'
| * | d9f990e Test Commit for file '063ad582-55ef-4d93-acbb-983a63696714'
|/ /  
* | 9824f44 Test Commit for file 'ab3cd2ee-713b-4828-8791-eadbff1f8dde'
* | 32057cf Test Commit for file '5c8f2323-0398-4b85-8141-045b6a55c069'
|/  
* e2aac2c (tag: 2.1.0) Test Commit for file '10b47998-99b6-4eb0-b9a3-6ee48b64df03'

@GeertvanHorrik
Copy link
Contributor Author

See PR #484

JakeGinnivan added a commit that referenced this issue Jul 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants