Skip to content

Commit

Permalink
v5.1.1 (#61)
Browse files Browse the repository at this point in the history
* better attributes

* lint tweak

* docs update

* doc tweak

* Added dependabot.yml

* version 2

* Updated lints for more concise handling

* lint cleanup

Co-authored-by: Jason Ozias <jason.ozias@kroger.com>
  • Loading branch information
CraZySacX and jasonozias authored Apr 7, 2021
1 parent dc298d6 commit 7eb1ae4
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 36 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"
name = "vergen"
readme = "README.md"
repository = "https://github.com/rustyhorde/vergen"
version = "5.1.0"
version = "5.1.1"

[features]
default = ["build", "cargo", "git", "rustc", "si"]
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ A full list of environment variables that can be generated are listed in the fol
| `VERGEN_CARGO_FEATURES` | git,build |
| `VERGEN_CARGO_PROFILE` | debug |
| `VERGEN_CARGO_TARGET_TRIPLE` | x86_64-unknown-linux-gnu |
| `VERGEN_SYSINFO_NAME` | Darwin |
| `VERGEN_SYSINFO_OS_VERSION` | MacOS 10.15.7 Catalina |
| `VERGEN_SYSINFO_NAME` | Manjaro Linux |
| `VERGEN_SYSINFO_OS_VERSION` | Linux Manjaro Linux |
| `VERGEN_SYSINFO_USER` | Yoda |
| `VERGEN_SYSINFO_TOTAL_MEMORY` | 16 GB |
| `VERGEN_SYSINFO_CPU_VENDOR` | Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz |
| `VERGEN_SYSINFO_CPU_CORE_COUNT` | 4 |
| `VERGEN_SYSINFO_TOTAL_MEMORY` | 33 GB |
| `VERGEN_SYSINFO_CPU_VENDOR` | Authentic AMD |
| `VERGEN_SYSINFO_CPU_CORE_COUNT` | 8 |
| `VERGEN_SYSINFO_CPU_NAME` | cpu0,cpu1,cpu2,cpu3,cpu4,cpu5,cpu6,cpu7 |
| `VERGEN_SYSINFO_CPU_BRAND` | AMD Ryzen Threadripper 1900X 8-Core Processor |
| `VERGEN_SYSINFO_CPU_FREQUENCY` | 3792 |

## Contributing
See the documentation at [CONTRIBUTING.md](CONTRIBUTING.md)
Expand Down
14 changes: 12 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use chrono::Utc;

pub fn main() {
println!("cargo:rerun-if-changed=build.rs");
// These are here so some doc tests work
let now = Utc::now();
println!(
Expand All @@ -10,6 +11,7 @@ pub fn main() {
println!("cargo:rustc-env=VERGEN_GIT_SEMVER=v3.2.0-86-g95fc0f5");
nightly_lints();
beta_lints();
stable_lints();
}

#[rustversion::nightly]
Expand All @@ -20,10 +22,18 @@ fn nightly_lints() {
#[rustversion::not(nightly)]
fn nightly_lints() {}

#[rustversion::any(beta, nightly)]
#[rustversion::beta]
fn beta_lints() {
println!("cargo:rustc-cfg=beta_lints");
}

#[rustversion::stable]
#[rustversion::not(beta)]
fn beta_lints() {}

#[rustversion::stable]
fn stable_lints() {
println!("cargo:rustc-cfg=stable_lints");
}

#[rustversion::not(stable)]
fn stable_lints() {}
65 changes: 37 additions & 28 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,15 @@
//! | `VERGEN_CARGO_PROFILE` | debug |
//! | `VERGEN_CARGO_TARGET_TRIPLE` | x86_64-unknown-linux-gnu |
//! | See [`Sysinfo`](crate::Sysinfo) to configure the following |
//! | `VERGEN_SYSINFO_NAME` | Darwin |
//! | `VERGEN_SYSINFO_OS_VERSION` | `MacOS 10.15.7 Catalina` |
//! | `VERGEN_SYSINFO_NAME` | Manjaro Linux |
//! | `VERGEN_SYSINFO_OS_VERSION` | Linux Manjaro Linux |
//! | `VERGEN_SYSINFO_USER` | Yoda |
//! | `VERGEN_SYSINFO_TOTAL_MEMORY` | 16 GB |
//! | `VERGEN_SYSINFO_CPU_VENDOR` | Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz |
//! | `VERGEN_SYSINFO_CPU_CORE_COUNT` | 4 |
//! | `VERGEN_SYSINFO_TOTAL_MEMORY` | 33 GB |
//! | `VERGEN_SYSINFO_CPU_VENDOR` | Authentic AMD |
//! | `VERGEN_SYSINFO_CPU_CORE_COUNT` | 8 |
//! | `VERGEN_SYSINFO_CPU_NAME` | cpu0,cpu1,cpu2,cpu3,cpu4,cpu5,cpu6,cpu7 |
//! | `VERGEN_SYSINFO_CPU_BRAND` | AMD Ryzen Threadripper 1900X 8-Core Processor |
//! | `VERGEN_SYSINFO_CPU_FREQUENCY` | 3792 |
//!
//! ## Usage
//!
Expand Down Expand Up @@ -193,6 +196,7 @@
dead_code,
deprecated,
deprecated_in_future,
disjoint_capture_drop_reorder,
drop_bounds,
elided_lifetimes_in_paths,
ellipsis_inclusive_range_patterns,
Expand All @@ -212,6 +216,7 @@
late_bound_lifetime_arguments,
macro_use_extern_crate,
meta_variable_misuse,
missing_abi,
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
Expand All @@ -232,7 +237,8 @@
proc_macro_derive_resolution_fallback,
redundant_semicolons,
renamed_and_removed_lints,
safe_packed_borrows,
semicolon_in_expressions_from_macros,
single_use_lifetimes,
stable_features,
temporary_cstring_as_ptr,
trivial_bounds,
Expand Down Expand Up @@ -278,47 +284,50 @@
where_clauses_object_safety,
while_true
)]
// nightly only lints
#![cfg_attr(nightly_lints, deny(or_patterns_back_compat))]
// nightly or beta only lints
#![cfg_attr(
not(nightly_lints),
any(beta_lints, nightly_lints),
deny(
legacy_derive_helpers,
noop_method_call,
proc_macro_back_compat,
unsafe_op_in_unsafe_fn,
unaligned_references,
)
)]
// beta or stable only lints
#![cfg_attr(any(beta_lints, stable_lints), deny(safe_packed_borrows))]
// stable only lints
#![cfg_attr(
stable_lints,
deny(
broken_intra_doc_links,
invalid_codeblock_attributes,
invalid_html_tags,
missing_crate_level_docs,
missing_doc_code_examples,
non_autolinks,
private_doc_tests,
)
)]
#![cfg_attr(
beta_lints,
deny(
disjoint_capture_drop_reorder,
missing_abi,
single_use_lifetimes,
semicolon_in_expressions_from_macros,
)
)]
#![cfg_attr(
nightly_lints,
deny(
legacy_derive_helpers,
noop_method_call,
proc_macro_back_compat,
unsafe_op_in_unsafe_fn,
private_intra_doc_links,
)
)]
// clippy lints
#![deny(clippy::all, clippy::cargo, clippy::pedantic)]
#![deny(clippy::all, clippy::pedantic)]
#![allow(clippy::copy_iterator)]
// rustdoc lints
#![cfg_attr(
nightly_lints,
any(nightly_lints, beta_lints),
deny(
rustdoc::broken_intra_doc_links,
rustdoc::invalid_codeblock_attributes,
rustdoc::invalid_html_tags,
rustdoc::missing_crate_level_docs,
rustdoc::missing_doc_code_examples,
// rustdoc::private_doc_tests,
rustdoc::non_autolinks,
rustdoc::private_doc_tests,
rustdoc::private_intra_doc_links,
)
)]

Expand Down

0 comments on commit 7eb1ae4

Please sign in to comment.