Skip to content

Support GitVersion.yml config file #575 #790

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

Merged
merged 2 commits into from
Apr 4, 2016

Conversation

qetza
Copy link
Contributor

@qetza qetza commented Feb 20, 2016

No description provided.

return yamlPath;
}

return ymlPath;
Copy link
Member

Choose a reason for hiding this comment

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

The two last returns here are redundant. IMHO it would be clearer to return string.empty or null if none of both files exists, and add checks outside, instead of returning the path to the deprecated file which not even exists. Or otherwise I would suggest to at least return the path to the current file and not the deprecated one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Pascal,
The last two returns are not the same, the complete logic is:

  • if the new file GitVersion.yml already exists we return it
  • if the deprecated file GitVersionConfig.yaml already exists we warn and return it
  • if no file exists we return the new file GitVersion.yml

Copy link
Member

Choose a reason for hiding this comment

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

Ah, sorry. missed the additional a in the last return 😊

Copy link
Member

Choose a reason for hiding this comment

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

@qetza How about renaming the variable yamlPath to deprecatedPath? Just a single letter separating two variables make them, as obvious by @pascalberger's comment, hard to differentiate. 😃

@asbjornu
Copy link
Member

asbjornu commented Apr 2, 2016

@qetza If you just rebase this onto the latest master to resolve the conflicts, I think this is a welcome addition that @gep13, @pascalberger or @JakeGinnivan can merge in when time allows. 👍

@JakeGinnivan JakeGinnivan merged commit 4be5d2d into GitTools:master Apr 4, 2016
@JakeGinnivan
Copy link
Contributor

Thanks @qetza! Been wanting this for ages :)

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.

4 participants