Include git commit information in $&version #172
+28
−8
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.
This is a relatively small change.
Version information is now generated automatically by the
mkversion
script which callsgit describe --tags
andgit show --format=%ci
.Breaking it down to most atomic units of user-visible change:
$&version
from0.9.2
tov0.9.2
(this is just based on howgit
output is formatted)$&version
from2-Mar-2022
to2022-03-02
(also just based ongit
output formatting)es version
prefix from$&version
$&version
into two separate terms, one for version string and one for commit datev0.9.2
tov0.9.2-(number of commits since tag)-g(commit id)
.As a last piece, this changes the last line of
initial.es
to use the new$&version
and remove the calls todate
andpwd
which upset reproducible-build systems like Nix.The main point of this PR is to add the commit info, so that
$&version
produces output more specific than today's "built sometime in the last 3 years". I think the old setup made a lot more sense in the '90s style of development without version control, and I think this setup makes more sense now. The other changes are basically just aesthetic.Fixes #147. This is semi-cribbed from the setup that rc has, so I guess this is also related to #1.