Skip to content

Commit 8202d7b

Browse files
authored
Prepare release (#49)
* Minor fixup
1 parent 2f349d4 commit 8202d7b

File tree

7 files changed

+43
-22
lines changed

7 files changed

+43
-22
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.4.2] - 2019-12-02
10+
### Added
11+
- [PR#48](https://github.com/EmbarkStudios/cargo-deny/pull/48) Added an `init` subcommand to generate a
12+
cargo-deny template file with guiding comments. Thanks [@foresterre](https://github.com/foresterre)!
13+
914
## [0.4.1] - 2019-11-28
1015
### Fixed
1116
- [PR#46](https://github.com/EmbarkStudios/cargo-deny/pull/46) Fixed issue where `license-file` was not being
@@ -80,7 +85,8 @@ Now each license has to be explicitly approved, either by listing them in `licen
8085
### Added
8186
- Initial implementation release
8287

83-
[Unreleased]: https://github.com/EmbarkStudios/cargo-deny/compare/0.4.1...HEAD
88+
[Unreleased]: https://github.com/EmbarkStudios/cargo-deny/compare/0.4.2...HEAD
89+
[0.4.2]: https://github.com/EmbarkStudios/cargo-deny/compare/0.4.1...0.4.2
8490
[0.4.1]: https://github.com/EmbarkStudios/cargo-deny/compare/0.4.0...0.4.1
8591
[0.4.0]: https://github.com/EmbarkStudios/cargo-deny/compare/0.3.0...0.4.0
8692
[0.3.0]: https://github.com/EmbarkStudios/cargo-deny/compare/0.3.0-beta...0.3.0

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "cargo-deny"
33
description = "Cargo plugin to help you manage large dependency graphs"
44
repository = "https://github.com/EmbarkStudios/cargo-deny"
5-
version = "0.4.1"
5+
version = "0.4.2"
66
authors = ["Embark <[email protected]>", "Jake Shadle <[email protected]>"]
77
edition = "2018"
88
license = "MIT OR Apache-2.0"
File renamed without changes.

resources/template.toml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,47 @@
33
# More documentation for the licenses section can be found here:
44
# https://github.com/EmbarkStudios/cargo-deny#the-licenses-section
55

6-
# Uncomment the following line to change the lint level for unlicensed crates [possible values: "deny", "allow" or "warn"].
6+
# Uncomment the following line to change the lint level for unlicensed crates
7+
# [possible values: "deny", "allow" or "warn"].
78
#unlicensed = "deny"
89

9-
# Uncomment the following line to explictly allow certain licenses [possible values: any SPDX 2.1 identifier].
10+
# Uncomment the following line to explictly allow certain licenses
11+
# See https://spdx.org/licenses/ for list of possible licenses
12+
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
1013
#allow = []
1114

12-
# Uncomment the following line to explictly disallow certain licenses [possible values: any SPDX 2.1 identifier].
15+
# Uncomment the following line to explictly disallow certain licenses
16+
# See https://spdx.org/licenses/ for list of possible licenses
17+
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
1318
#deny = []
1419

15-
# Uncomment the following line to change the lint level for licenses considered copyleft [possible values: "deny", "allow" or "warn"].
20+
# Uncomment the following line to change the lint level for licenses considered copyleft
21+
# [possible values: "deny", "allow" or "warn"].
1622
#copyleft = "warn"
1723

18-
# Uncomment the following line to approve or deny OSI-approved or FSF Free/Libre licenses [possible values: "both", "either", "osi-only", "fsf-only" or "neither"].
24+
# Uncomment the following line to approve or deny OSI-approved or FSF Free/Libre licenses
25+
# [possible values: "both", "either", "osi-only", "fsf-only" or "neither"].
1926
#allow-osi-fsf-free = "neither"
2027

21-
# Uncomment the following line to change the confidence threshold. [possible values: any between 0.0 and 1.0].
22-
# The higher the value, the more closely the license text must be to the canonical license text of a valid SPDX license file.
28+
# Uncomment the following line to change the confidence threshold. The higher the value,
29+
# the more closely the license text must be to the canonical license text of a valid
30+
# SPDX license file.
31+
# [possible values: any between 0.0 and 1.0].
2332
#confidence-threshold = 0.8
2433

2534
[bans]
2635
# This section is considered when running `cargo deny check ban`.
2736
# More documentation about the 'bans' section can be found here:
2837
# https://github.com/EmbarkStudios/cargo-deny#crate-bans-cargo-deny-check-ban
2938

30-
# Uncomment the following line to change what happens when multiple versions of the same crate are encountered [possible values: "deny", "warn" or "allow"].
39+
# Uncomment the following line to change what happens when multiple versions of the same
40+
# crate are encountered
41+
# [possible values: "deny", "warn" or "allow"].
3142
#multiple-versions = "warn"
3243

33-
# Uncomment the following line to change the highlighting variant used to multiple versions of the same crate when creating
34-
# a dotgraph of your crates dependencies [possible values: "lowest-version", "simplest-path" or "all"].
44+
# Uncomment the following line to change the highlighting variant used to multiple versions
45+
# of the same crate when creating a dotgraph of your crates dependencies
46+
# [possible values: "lowest-version", "simplest-path" or "all"].
3547
#highlight = "all"
3648

3749
# Uncomment the following line to allow specific crates.
@@ -43,6 +55,7 @@
4355
# Uncomment the following line to skip specific crates.
4456
#skip = []
4557

46-
# Uncomment the following line to skip specific crates (including different versions of the same crate down the dependency
47-
# tree). By default, the depth is infinite. If however desired, the depth can be ajusted.
58+
# Uncomment the following line to skip specific crates (including different versions of the
59+
# same crate down the dependency tree). By default, the depth is infinite, but you can also
60+
# specify `depth = <integer>` to limit it.
4861
#skip-tree = []

src/cargo-deny/init.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,19 @@ pub fn cmd(args: Args, context_dir: PathBuf) -> Result<(), Error> {
2525
// make sure the file does not exist yet
2626
ensure!(
2727
std::fs::metadata(&cfg_file).is_err(),
28-
"unable to initialize cargo deny config file ; the provided path already exists"
28+
"unable to initialize cargo-deny config: '{}' already exists",
29+
cfg_file.display(),
2930
);
31+
3032
// make sure the path does not terminate in '..'; we need a file name.
3133
ensure!(
32-
&cfg_file.file_name().is_some(),
33-
"unable to create a config file with the given name ; the given file path is not valid"
34+
cfg_file.file_name().is_some(),
35+
"unable to create cargo-deny config: '{}' has an invalid filename",
36+
cfg_file.display(),
3437
);
3538

36-
log::info!("saving config file to: {}", &cfg_file.display());
37-
38-
std::fs::write(cfg_file, CONTENTS).context("unable to write config file")?;
39+
std::fs::write(&cfg_file, CONTENTS).context("unable to write config file")?;
40+
log::info!("saved config file to: {}", cfg_file.display());
3941

4042
Ok(())
4143
}

src/licenses.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::{
1212
sync::Arc,
1313
};
1414

15-
const LICENSE_CACHE: &[u8] = include_bytes!("../spdx_cache.bin.zstd");
15+
const LICENSE_CACHE: &[u8] = include_bytes!("../resources/spdx_cache.bin.zstd");
1616

1717
const fn lint_deny() -> LintLevel {
1818
LintLevel::Deny

0 commit comments

Comments
 (0)