Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/baoyachi/shadow-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
baoyachi committed Jun 28, 2021
2 parents ba23143 + e00245e commit d51fa82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

# example_shadow cargo run
- name: Run example_shadow
run: cargo run && tree && target/debug/example_shadow -V
run: cargo run
working-directory: ./example_shadow

# build on nightly
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ git2 = { version = "0.13.8", default-features = false, optional = true }
default = ["git2"]

[workspace]
members = ["example_shadow", "example_shadow_hook"]
members = ["example_shadow", "example_shadow_hook"]
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ Modify your `Cargo.toml` like so:
build = "build.rs"

[dependencies]
shadow-rs = "0.5"
shadow-rs = "0.6"

[build-dependencies]
shadow-rs = "0.5"
shadow-rs = "0.6"
```

### 2) Create `build.rs` file
Expand Down Expand Up @@ -86,7 +86,7 @@ fn main() {
//shadow-rs built in function
println!("{}", shadow_rs::is_debug()); // check if this is a debug build
println!("{}", shadow_rs::branch()); // get current project git branch. e.g.'master'
println!("{}", shadow_rs::tag()); // get current project git head tag. e.g.'v1.5.3'
println!("{}", shadow_rs::tag()); // get current project git head tag. e.g.'v1.5.3'

//shadow-rs built in const
println!("{}", build::version()); // the version (description binary detail information)
Expand All @@ -95,7 +95,7 @@ fn main() {
println!("{}", build::PKG_VERSION_MAJOR); //current package major version. e.g. '1'
println!("{}", build::PKG_VERSION_MINOR); //current package minor version. e.g. '3'
println!("{}", build::PKG_VERSION_PATCH); //current package minor version. e.g. '15'
println!("{}", build::PKG_VERSION_PRE); //current package minor version. e.g. 'beta2'
println!("{}", build::PKG_VERSION_PRE); //current package minor version. e.g. 'beta2'
println!("{}", build::BRANCH); // the branch, e.g. 'master'
println!("{}", build::TAG); // the tag, e.g. 'v1.0.0'
println!("{}", build::SHORT_COMMIT); // short commit hash, e.g. '8405e28e'
Expand All @@ -114,8 +114,8 @@ fn main() {

println!("{}", build::PROJECT_NAME); // your project name, e.g. 'shadow-rs'
println!("{}", build::BUILD_TIME); // time when start build occurred, e.g. '2020-08-16 14:50:25'
println!("build_time_2822:{}", build::BUILD_TIME_2822); // time when start build occurred by rfc2822, e.g. 'Thu, 24 Jun 2021 21:33:59 +0800'
println!("build_time_3339:{}", build::BUILD_TIME_3339); // time when start build occurred by rfc3339, e.g. '2021-06-24T21:33:59.972494+08:00'
println!("{}", build::BUILD_TIME_2822); // time when start build occurred by rfc2822, e.g. 'Thu, 24 Jun 2021 21:33:59 +0800'
println!("{}", build::BUILD_TIME_3339); // time when start build occurred by rfc3339, e.g. '2021-06-24T21:33:59.972494+08:00'
println!("{}", build::BUILD_RUST_CHANNEL); // e.g. 'debug'
}
```
Expand Down Expand Up @@ -181,4 +181,4 @@ here: [Shadow Users Collection](https://github.com/baoyachi/shadow-rs/issues/19)
<td align="center"><a href="https://github.com/Riey/kime"><img src="https://github.com/Riey/kime/raw/develop/docs/assets/kime-roundy-default-without-text-bluegrey.png?s=200&v=4" width="100px;" alt="kime"/><br /><sub><b>kime</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/Hirevo/alexandrie"><div>alexandrie</div><br/><sub><b>alexandrie</b></sub></a><br /></td>
</tr>
</table>
</table>

0 comments on commit d51fa82

Please sign in to comment.