-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
supervisor: add version reporting (#184)
- Loading branch information
Showing
9 changed files
with
90 additions
and
17 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,34 @@ | ||
# build-info | ||
# orb-build-info | ||
|
||
Helper library for collecting information about the artifact | ||
being built. | ||
|
||
## How to use | ||
|
||
First, add the following dependencies: | ||
```toml | ||
[dependencies] | ||
orb-build-info.workspace = true | ||
|
||
[build-dependencies] | ||
orb-build-info = { workspace = true, features = ["build-script"] } | ||
``` | ||
|
||
Then make a `build.rs` script: | ||
```rust | ||
fn main() { | ||
orb_build_info::initialize().expect("failed to initialize") | ||
} | ||
``` | ||
|
||
Finally, in `lib.rs` or `main.rs`: | ||
|
||
```rust | ||
use orb_build_info::{BuildInfo, make_build_info}; | ||
|
||
const BUILD_INFO: BuildInfo = make_build_info!(); | ||
``` | ||
|
||
You can now access the `BUILD_INFO` constant anywhere in your crate, and do things | ||
like report the git commit, etc. See how it is used in `orb-mcu-util` and other | ||
binaries. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
orb_build_info::initialize().expect("failed to initialize") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters