Skip to content

Conversation

@hyabean
Copy link
Contributor

@hyabean hyabean commented Dec 4, 2021

#2927

Description

if GitVersionContext.IsCurrentCommitTagged is true, skip call the IGitPreparer.Prepare method.

Related Issue

Fixes #2927

Motivation and Context

build failed on a CI agent (JENKINS), while it success on a workstation.

How Has This Been Tested?

Tested the Reproduce case in #2927

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 asbjornu changed the title fix #2927. Avoid throwing WarningException by skip call gitPreparer when building a tagged version. Avoid throwing WarningException by skip call gitPreparer when building a tagged version Dec 6, 2021
Copy link
Member

@asbjornu asbjornu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks benign enough, but could you please add a test that provokes the problem?

@hyabean
Copy link
Contributor Author

hyabean commented Dec 12, 2021

@asbjornu unit tests added

Copy link
Member

@asbjornu asbjornu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@asbjornu asbjornu merged commit 4201dcf into GitTools:main Dec 13, 2021
@mergify
Copy link
Contributor

mergify bot commented Dec 13, 2021

Thank you @jhy871167495 for your contribution!

hyabean pushed a commit to hyabean/GitVersion that referenced this pull request Dec 27, 2021
hyabean pushed a commit to hyabean/GitVersion that referenced this pull request Dec 28, 2021
@arturcic arturcic added this to the 5.x milestone Jan 24, 2022
@arturcic arturcic removed this from the 5.x milestone Feb 16, 2022
hyabean added a commit to hyabean/GitVersion that referenced this pull request Mar 5, 2022
asbjornu added a commit that referenced this pull request Mar 5, 2022
invalid use of Lazy<GitVersionContext>, #2933 fix doesn't work actualy
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.

[Bug]Failed to try and guess branch to use. Move one of the branches along a commit to remove warning

3 participants