-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat: add detailed version information #1202
base: master
Are you sure you want to change the base?
Conversation
This adds CLI args to display more information about Nextclade version and build environment. - `--version-detailed` (`-W`) shows single-line detailed information, for example: ``` 2.14.0 (Debug; Dirty; Commit d532ea3; Branch v3; Committed on 2023-07-17 17:50:05 +00:00; Built on 2023-07-17 17:59:28 +00:00) ``` - `--version-full` (`-X`) shows even more information in multi-line format, for example: ``` Version 2.14.0 Debug true Dirty true Branch v3 Tag Commit d532ea3 Committed on 2023-07-17 17:50:05 +00:00 Built on 2023-07-17 17:59:28 +00:00 Build OS linux-x86_64 Rust version rustc 1.70.0 (90c541806 2023-05-31) Rust channel 1.70.0-x86_64-unknown-linux-gnu ``` - `--version-json` (`-Y`) shows the same information as `--version-full`, but in JSON format (suitable for machine processing) ```json { "version": "2.14.0", "is_debug": true, "git_is_clean": false, "git_branch": "v3", "git_tag": "", "git_commit": "d532ea3a", "git_commit_date": "2023-07-17 17:50:05 +00:00", "build_time": "2023-07-17 17:59:28 +00:00", "build_os": "linux-x86_64", "rust_version": "rustc 1.70.0 (90c541806 2023-05-31)", "rust_channel": "1.70.0-x86_64-unknown-linux-gnu" } ``` Notes: - "debug" means that the program is compiled without `--release` flag - "dirty" means that there were uncommitted git changes during build This functionality required adding additional build step (`build.rs` file).
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This approach using |
This is rad :) I think it's ok if it doesn't build on wasm and some linux distributions. It's entirely optional and mostly for internal use. |
93f31a9
to
edefa32
Compare
27d4a31
to
9010d85
Compare
This adds CLI args to display more information about Nextclade version and build environment.
--version-detailed
(-W
) shows single-line detailed information, for example:--version-full
(-X
) shows even more information in multi-line format, for example:--version-json
(-Y
) shows the same information as--version-full
, but in JSON format (suitable for machine processing)Notes:
--release
flagThis functionality required adding additional build step (
build.rs
file).