Closed crotwell closed 1 month ago
This seems to happen when using annotated tags. We don't use annotated tag so I missed testing this. This command should work on annotated tags but I didn't test all other scenarios.
git show -s --no-notes --format='%cI' $(git rev-list -n 1 first_tag) --
Please note that the command is using substitution syntax $()
which may not work on Windows. It needs to be split into 2 commands instead.
I'll confirm if it doesn't break anything else then will make another pull request.
Sorry for the issue
Do you think this would work?
git log -1 --format=%ai $git_last_tag
Maybe better with strict iso dates, so --format=%aI
I tested multiple scenarios and using the git log
command works. Also, strict iso8601 format is better for consistency with other dates.
thanks for testing. updated, released 1.4.1 with the log command
In new 1.4.0, sometimes git_last_tag_date gives multiline value, which is then not legal java:
This is from a test project, after:
git tag -a -m 'first tag' first_tag
Running the git command manually also gives a longer response:
This is with
git version 2.39.5 (Apple Git-154)
.Maybe related to annotate tags???
@AliAlbarrak have you seen this? Seems like either a better git cmd to only get the date, or some code to handle a multiline string is needed?