New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a --version flag #516

Merged
merged 6 commits into from Aug 25, 2017

Conversation

Projects
None yet
3 participants
@drosseau
Contributor

drosseau commented Aug 24, 2017

Adds a flag to display the version and git rev.

$ ion --version
ion 1.0.5 (x86_64-unknown-linux-gnu)
rev d1d02727024f98b199490122604bc8a7712c2fe4

Issues

include!(concat!(env!("OUT_DIR"), "/version_string")) might eventually be an issue if / isn't the default path separator though. You can't use Path::MAIN_SEPARATOR there.

First this tries to get the revision from git rev-parse master and then falls back to trying the .git/refs/heads/master file if the command fails. That kinda locks in the build to master branch, but I think that is OK?

(Sorry about the messy commits..)

Closes #515

@mmstick

This comment has been minimized.

Collaborator

mmstick commented Aug 25, 2017

Thanks! This is awesome.

@mmstick mmstick merged commit 582ecbb into redox-os:master Aug 25, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@BafDyce

This comment has been minimized.

Contributor

BafDyce commented Aug 25, 2017

Awesome! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment