Skip to content
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

implement servo --version , and include the compilation date #11241

Closed
paulrouget opened this issue May 18, 2016 · 5 comments
Closed

implement servo --version , and include the compilation date #11241

paulrouget opened this issue May 18, 2016 · 5 comments

Comments

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented May 18, 2016

In the browserhtml team, we use servo nightly builds, and it's always difficult to know which version of servo one is currently using.

Could we have a --version option, that would return something like:

$ servo --version
Servo 0.0.1 - compiled 2016-05-27
@campaul
Copy link
Contributor

@campaul campaul commented May 19, 2016

I'm interested in working on this.

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented May 19, 2016

@campaul Thanks! Command line options are defined here: https://github.com/servo/servo/blob/master/components/util/opts.rs

@jdm
Copy link
Member

@jdm jdm commented May 19, 2016

The only idea I have for including the build date is to write it to a file in build.rs and use that file via the include_str! macro.

@campaul
Copy link
Contributor

@campaul campaul commented May 19, 2016

I'm using env!("CARGO_PKG_VERSION"); to get the version number, so I was thinking I could do something similar and have mach set an environment variable with the current date.

@jdm
Copy link
Member

@jdm jdm commented May 19, 2016

That might work too!

@campaul campaul mentioned this issue May 19, 2016
3 of 5 tasks complete
bors-servo added a commit that referenced this issue Jun 9, 2016
Add `--version` flag

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy --faster` does not report any errors
- [X] These changes fix #11241 (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Not 100% sure of a good way to test this, so I'm submitting as is for feedback. Manually testing it appears to work fine.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11262)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Jun 29, 2016
Add `--version` flag

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy --faster` does not report any errors
- [X] These changes fix #11241 (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Not 100% sure of a good way to test this, so I'm submitting as is for feedback. Manually testing it appears to work fine.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11262)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.