fix: correct release date #119
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
address #118
@sbillinge please check this and decide if it's the good way, thanks!
I think this might be the easiest way to provide the release date. Whenever the installed package use
__date__for the first time (i.e. creating aPdfFitobject), it will check thepypirelease online, get the release date of that version, and save the date at the end ofversion.pyas a line of comment. After this, it will only get__date__by parsing this comment line. When the package gets an update,version.pywill be removed and reinstalled, leaving room for the new date. Any error will fall the date back to the creation date of the package (install date).This is an unusual approach, as it modify the package file during the user's first successful use. This means if the user does some hash check after using it (which is very unlikely) it will not pass the check. (A bit like a wax seal...)
The more conventional way as suggested in the issue, pulling date of the latest git tag during release CI, could work. But the changes would be less easy to make and test. It will also affect all other packages using the CI, which is not necessary.