Skip to content

Add configuration parameter to format CommitDate #1305

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

Closed
ccHanibal opened this issue Oct 6, 2017 · 2 comments
Closed

Add configuration parameter to format CommitDate #1305

ccHanibal opened this issue Oct 6, 2017 · 2 comments

Comments

@ccHanibal
Copy link
Contributor

We use the last commit date of a repository to build artifact names on Jenkins.
Currently we extract it with git log -1 --format=COMMIT_DATE=%%cd --date=format:%%Y%%m%%d > gitdate.prop and inject it later on.
We now plan to use gitversion for calculating version numbers. In this step it would be perfect if we could replace our current step to get the date with gitversion as well, but we need it formatted without dashes.

Any chance to add a configuration parameter commit-date-format so that one can customize the output of gitversion?

@asbjornu
Copy link
Member

asbjornu commented Oct 6, 2017

Can't you use one of the variables GitVersion output to format this yourself?

@ccHanibal
Copy link
Contributor Author

ccHanibal commented Oct 6, 2017

Of course I could do that but it would be easier to maintain for us if GitVersion does it directly.
Would it be ok if I implement it myself?

ccHanibal added a commit to ccHanibal/GitVersion that referenced this issue Oct 6, 2017
ccHanibal added a commit to ccHanibal/GitVersion that referenced this issue Oct 14, 2017
asbjornu added a commit that referenced this issue Oct 14, 2017
…gurable

Add configuration parameter to format CommitDate #1305
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