-
Notifications
You must be signed in to change notification settings - Fork 654
Add configuration parameter to format CommitDate #1305 #1306
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
Add configuration parameter to format CommitDate #1305 #1306
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a couple of comments and this LGTM.
} | ||
|
||
[Test] | ||
[TestCaseSource(nameof(CommitDateFormatTestCases))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the test case formats are constant strings, please add them as regular [TestCase]
attributes instead of the more complicated TestCaseData
.
@@ -109,7 +109,7 @@ public string Sha | |||
|
|||
public string CommitDate | |||
{ | |||
get { return _semver.BuildMetaData.CommitDate.UtcDateTime.ToString("yyyy-MM-dd"); } | |||
get { return _semver.BuildMetaData.CommitDate.UtcDateTime.ToString(_config.CommitDateFormat); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it perhaps a good idea to pass in CultureInfo.InvariantCulture
here, just to avoid potential i18n problems or is it a "feature" that the date can be formatted in the locale of the process GitVersion is run under?
I adopted your advices. Please review them. |
Perfect! Can you please do a git checkout master
git fetch upstream
git merge upstream/master
git checkout feature-commitdateformatconfigurable
git rebase master
git push --force If you don't have the remote
If you have any questions, please don't hesitate to ask. Thanks! |
Sure I'll give it a try. Never done that before. |
0a73167
to
dcc9c2b
Compare
@ccHanibal: Looks like that worked. Thanks! |
As requested in #1305