Commit Graph

3 Commits (c15996aff597aa8cb63850c6080bc69470bb84a5)

Author SHA1 Message Date
Michael Davis a8cf0c6b90
filter git revision on git command success exit code (#1674)
The unwrap (or '.ok()' rather) triggers for some errors but not
negative status codes. In the case where helix is being packaged
in an empty git repository, the existing mechanism will fail because

    git init
    git rev-parse HEAD

gives a negative exit code and prints to stderr

    stderr: "fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree....

with a stdout of "HEAD\n" (too short to slice with [..8]).
2 years ago
Blaž Hrastnik d3221b03a2 fix: Only parse git revision, don't use the tag for version
If building from source and the source is contained in a larger
repository, we'd contain the wrong version. It's also easy to
accidentally have a newer tag that would change the version.
2 years ago
Gygaxis Vainhardt 0949a0de7f
Add commit hash to version info, if present (#957)
* Add commit hash to version info, if present

* Rename GIT_HASH to indicate that it includes version, fix linter error

* Add whitespace after use statement

Co-authored-by: Ivan Tham <pickfire@riseup.net>

Co-authored-by: Ivan Tham <pickfire@riseup.net>
3 years ago