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

Don't consider "tag-prefix" as optional if it's explicitly specified #3208

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

AlexPykavy
Copy link
Contributor

@AlexPykavy AlexPykavy commented Sep 26, 2022

Description

To correctly calculate the next version with the prefix.

For example, we develop the main product and some its plugin in the same repository and have the following git tags list:

  • 0.1.0
  • 0.1.1
  • 0.2.0
  • 0.2.1
  • plugin_0.1.0
  • plugin_0.1.1

The expected next plugin version is 0.1.2 not 0.2.2 (plugin_ prefix will be prepended before setting the tag).

Related Issue

Resolves #3216.

Motivation and Context

Makes possible to have 2 independent versioning sequences in the same repository.

How Has This Been Tested?

Unit test case is added.

Screenshots (if appropriate):

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@asbjornu
Copy link
Member

I'm not sure whether to consider this a breaking change or not. If it isn't, we should re-target and rebase it on support/5.x instead of main and ship it in a v5 minor release. Also please have a look at #3218 and #3060 which seems related.

@AlexPykavy
Copy link
Contributor Author

@asbjornu , I've reviewed #3218 (and the corresponding PR #3224) and #3060. I agree with #3224 (comment) answer that we are talking about different tags.

I think that the only reason why this change can be considered as a breaking if gitversion init command puts the default tag-prefix. I checked it and looks like it doesn't. Then, may I just retarget the PR if there are no other comments?

@asbjornu
Copy link
Member

@AlexPykavy, yes, I think you can retarget this against support/5.x.

To correctly calculate the next version with the prefix.

For example, we develop the main product and some its plugin
in the same repository and have the following git tags list:
- 0.1.0
- 0.1.1
- 0.2.0
- 0.2.1
- plugin_0.1.0
- plugin_0.1.1

The expected next plugin version is `0.1.2` not `0.2.2` (`plugin_` prefix
will be prepended before setting the tag).
@AlexPykavy AlexPykavy changed the base branch from main to support/5.x October 25, 2022 09:14
@AlexPykavy
Copy link
Contributor Author

@AlexPykavy, yes, I think you can retarget this against support/5.x.

Done.

@asbjornu asbjornu merged commit 8cd3a1b into GitTools:support/5.x Oct 25, 2022
@mergify
Copy link
Contributor

mergify bot commented Oct 25, 2022

Thank you @AlexPykavy for your contribution!

RatserX added a commit to RatserX/GitVersion that referenced this pull request Nov 3, 2022
commit f76d8b8
Merge: f6d86dc 8c6175c
Author: Artur <arturcic@gmail.com>
Date:   Wed Oct 26 09:05:35 2022 +0200

    Merge pull request GitTools#3246 from arturcic/feature/markdown-lint

    Fix docs markdown lint errors

commit 8c6175c
Author: Artur <arturcic@gmail.com>
Date:   Wed Oct 26 08:40:13 2022 +0200

    GitTools#2964 - disable tests for .net48

commit 21c34fb
Author: Artur <arturcic@gmail.com>
Date:   Wed Oct 26 02:07:16 2022 +0200

    GitTools#2964 - use bash for reporter

commit 93f4637
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 23:50:45 2022 +0200

    GitTools#2964 fix markdown linting errors

commit 18586fe
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 19:21:56 2022 +0200

    GitTools#2964 fix html-proofer errors

commit f6d86dc
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 16:15:45 2022 +0200

    (build) fix set-output syntax

    https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

commit 2cc427c
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 15:25:27 2022 +0200

    Revert "(build) fix set-output syntax"

    This reverts commit b906175.

commit b812802
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 15:49:10 2022 +0200

    Revert "(build) fix set-output syntax"

    This reverts commit b07a8b9.

commit b07a8b9
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 15:49:10 2022 +0200

    (build) fix set-output syntax

    https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

commit b906175
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 15:25:27 2022 +0200

    (build) fix set-output syntax

    https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

commit 34f9de7
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 14:08:54 2022 +0200

    (build) update the actions/cache@v3.0.11

commit f954025
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 14:01:52 2022 +0200

    (build) update the actions/setup-dotnet@v3.0.2

commit 819f116
Merge: 8cd3a1b cac4eb1
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 13:26:41 2022 +0200

    Merge pull request GitTools#3179 from chhh/feature/report-project-file-location

    Add local project file location to exception when parsing fails

commit cac4eb1
Author: Dmitry Avtonomov <dmitry.avtononomov@bertis.com>
Date:   Fri Aug 26 13:38:47 2022 -0700

    Add local project file location to exception when parsing fails

    Helps in solutions with multiple projects, when one of csproj files
    becomes corrupt. User knows where to apply fixes.

commit 8cd3a1b
Merge: 3e5d1e7 1071e1c
Author: Asbjørn Ulsberg <asbjorn@ulsberg.no>
Date:   Tue Oct 25 11:26:26 2022 +0200

    Merge pull request GitTools#3208 from AlexPykavy/main

    Don't consider "tag-prefix" as optional if it's explicitly specified

commit 1071e1c
Author: Alexander Pykavy <aleksandrpykavyj@gmail.com>
Date:   Mon Sep 26 21:12:26 2022 +0200

    Don't consider "tag-prefix" as optional if it's explicitly specified

    To correctly calculate the next version with the prefix.

    For example, we develop the main product and some its plugin
    in the same repository and have the following git tags list:
    - 0.1.0
    - 0.1.1
    - 0.2.0
    - 0.2.1
    - plugin_0.1.0
    - plugin_0.1.1

    The expected next plugin version is `0.1.2` not `0.2.2` (`plugin_` prefix
    will be prepended before setting the tag).
RatserX added a commit to RatserX/GitVersion that referenced this pull request Nov 3, 2022
commit f76d8b8
Merge: f6d86dc 8c6175c
Author: Artur <arturcic@gmail.com>
Date:   Wed Oct 26 09:05:35 2022 +0200

    Merge pull request GitTools#3246 from arturcic/feature/markdown-lint

    Fix docs markdown lint errors

commit 8c6175c
Author: Artur <arturcic@gmail.com>
Date:   Wed Oct 26 08:40:13 2022 +0200

    GitTools#2964 - disable tests for .net48

commit 21c34fb
Author: Artur <arturcic@gmail.com>
Date:   Wed Oct 26 02:07:16 2022 +0200

    GitTools#2964 - use bash for reporter

commit 93f4637
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 23:50:45 2022 +0200

    GitTools#2964 fix markdown linting errors

commit 18586fe
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 19:21:56 2022 +0200

    GitTools#2964 fix html-proofer errors

commit f6d86dc
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 16:15:45 2022 +0200

    (build) fix set-output syntax

    https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

commit 2cc427c
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 15:25:27 2022 +0200

    Revert "(build) fix set-output syntax"

    This reverts commit b906175.

commit b812802
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 15:49:10 2022 +0200

    Revert "(build) fix set-output syntax"

    This reverts commit b07a8b9.

commit b07a8b9
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 15:49:10 2022 +0200

    (build) fix set-output syntax

    https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

commit b906175
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 15:25:27 2022 +0200

    (build) fix set-output syntax

    https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

commit 34f9de7
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 14:08:54 2022 +0200

    (build) update the actions/cache@v3.0.11

commit f954025
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 14:01:52 2022 +0200

    (build) update the actions/setup-dotnet@v3.0.2

commit 819f116
Merge: 8cd3a1b cac4eb1
Author: Artur <arturcic@gmail.com>
Date:   Tue Oct 25 13:26:41 2022 +0200

    Merge pull request GitTools#3179 from chhh/feature/report-project-file-location

    Add local project file location to exception when parsing fails

commit cac4eb1
Author: Dmitry Avtonomov <dmitry.avtononomov@bertis.com>
Date:   Fri Aug 26 13:38:47 2022 -0700

    Add local project file location to exception when parsing fails

    Helps in solutions with multiple projects, when one of csproj files
    becomes corrupt. User knows where to apply fixes.

commit 8cd3a1b
Merge: 3e5d1e7 1071e1c
Author: Asbjørn Ulsberg <asbjorn@ulsberg.no>
Date:   Tue Oct 25 11:26:26 2022 +0200

    Merge pull request GitTools#3208 from AlexPykavy/main

    Don't consider "tag-prefix" as optional if it's explicitly specified

commit 1071e1c
Author: Alexander Pykavy <aleksandrpykavyj@gmail.com>
Date:   Mon Sep 26 21:12:26 2022 +0200

    Don't consider "tag-prefix" as optional if it's explicitly specified

    To correctly calculate the next version with the prefix.

    For example, we develop the main product and some its plugin
    in the same repository and have the following git tags list:
    - 0.1.0
    - 0.1.1
    - 0.2.0
    - 0.2.1
    - plugin_0.1.0
    - plugin_0.1.1

    The expected next plugin version is `0.1.2` not `0.2.2` (`plugin_` prefix
    will be prepended before setting the tag).
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

Successfully merging this pull request may close these issues.

[Improvement] Don't consider tag-prefix as optional
2 participants