Skip to content

Commit e14437f

Browse files
authored
Merge pull request #299 from o2sh/ci-fail-on-deprecated
make build fail on deprecated
2 parents 25f85c5 + f6e2430 commit e14437f

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Build Debug
2727
run: |
2828
rustc --version
29-
cargo build
29+
cargo build --features=fail-on-deprecated
3030
3131
- name: Run tests
3232
run: cargo test

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ base64 = "0.13.0"
4343
lazy_static = "1.4"
4444
more-asserts = "0.2"
4545
paste = "1"
46+
47+
[features]
48+
fail-on-deprecated = []

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build:
2-
cargo build --release
2+
cargo build --release --features=fail-on-deprecated
33

44
install: build
55
sudo cp target/release/onefetch /usr/local/bin

src/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// `error_chain!` can recurse deeply
22
#![recursion_limit = "1024"]
3+
#![cfg_attr(feature = "fail-on-deprecated", deny(deprecated))]
34

45
use onefetch::{cli::Cli, cli_utils, error::*, info};
56

0 commit comments

Comments
 (0)