Closed ssbarnea closed 1 year ago
Thank you for the idea. This sounds good! Having a --date
option on top of that would be nice.
Adding a data option would not be a big step in making the tool easier to call as we would need to run git log -1 --format="%at"
or similar to get last commit date.
What do you think about calling git by default and using its last commit date by default instead of "now". If git is absent or fails, we can always fallback to now().
In theory, if used with --pyfile
, you could just reflect the history of the file. Otherwise, all you wrote sounds nice.
The --date
can be added later (beating any heuristic we use by default).
Would #76 solve this issue for you?
I think so, thanks!
As I do want to track the output file with the repository, I need to make the output of the command idempotent. Still, I observed that a date is dumped in the first line, which would prevent doing that.
Would it be possible to avoid including this date or to at least allow a custom value for it? If the man page requires a date, we could likely get the date of the last tag from git, which should prevent the build from breaking between commits.