You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem/context ? Please describe if applicable.
This is a JIP and expands a bit over #645 and #606.
Right now the reported version from jormungandr --version compiled from master is the same as the one from the latest release so there is no way to tell if the binary is up to date or not. Furthermore since master is a fast moving branch, it would be nice to have more info reported form --version.
Describe the solution you'd like
The following is just an example and may be tweeked as needed.
jormungandr 0.3.3 (master-3326b9b+, debug build, linux [x86_64]) - [rustc 1.37.0 (eae3437df 2019-08-13)]
\_________/ \___/ \____/ \_____/| \_________/ \___/ \____/ \_________________________________/
| | | | | | | | |
| | | | | | | | +- rustc --version
| | | | | | | +- std::env::consts::ARCH
| | | | | | +- std::env::consts::OS
| | | | | +- Checks debug_assertions
| | | | +- Adds a "+" if the working tree is not clean
| | | +- Commit hash
| | +- Current branch name
| +- Package version from Cargo.toml
+- Package name from Cargo.toml
Additional context
To produce the proposed output, tried to create a cargo build script build.rs that (ab)uses CARGO_PKG_VERSION, but due to zero rust experience wasn't able to properly complete it. ¯\_(ツ)_/¯
In the example the only dependency is the git binary and there is no need to change any other part of the code.
The following works, but needs proper error handling. The missing part is that if git binary is missing or there is an error, the build should continue and the reported version should the same as today jormungandr 0.3.3
Is your feature request related to a problem/context ? Please describe if applicable.
This is a JIP and expands a bit over #645 and #606.
Right now the reported version from
jormungandr --versioncompiled from master is the same as the one from the latest release so there is no way to tell if the binary is up to date or not. Furthermore since master is a fast moving branch, it would be nice to have more info reported form --version.Describe the solution you'd like
The following is just an example and may be tweeked as needed.
Additional context
To produce the proposed output, tried to create a cargo build script
build.rsthat (ab)usesCARGO_PKG_VERSION, but due to zero rust experience wasn't able to properly complete it.¯\_(ツ)_/¯In the example the only dependency is the
gitbinary and there is no need to change any other part of the code.The following works, but needs proper error handling. The missing part is that if
gitbinary is missing or there is an error, the build should continue and the reported version should the same as todayjormungandr 0.3.3Note: https://vallentin.io/2019/06/06/versioning served as guide for the idea and the code.
The text was updated successfully, but these errors were encountered: