Skip to content

Commit 2937032

Browse files
Merge #826
826: cleanup r=Alexhuszagh a=Emilgardis Co-authored-by: Emil Gardström <[email protected]>
2 parents d0cfe20 + 6e536c7 commit 2937032

File tree

10 files changed

+64
-41
lines changed

10 files changed

+64
-41
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020
- name: Run ShellCheck
2121
uses: azohra/[email protected]
2222

23+
cargo-deny:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: EmbarkStudios/cargo-deny-action@v1
28+
2329
fmt:
2430
runs-on: ubuntu-latest
2531
steps:

.github/workflows/weekly.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@ jobs:
2222
run: cargo build -p xtask
2323
- name: Build Docker image
2424
id: build-docker-image
25-
run: cargo xtask build-docker-image -v --no-cache --no-output --from-ci --tag weekly
25+
run: cargo xtask build-docker-image -v --no-cache --no-output --from-ci --no-fastfail --tag weekly
26+
cargo-deny:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v3
30+
- uses: EmbarkStudios/cargo-deny-action@v1

Cargo.lock

Lines changed: 7 additions & 7 deletions
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
@@ -42,7 +42,7 @@ serde = { version = "1", features = ["derive"] }
4242
serde_json = "1"
4343
serde_ignored = "0.1.2"
4444
shell-words = "1.1.0"
45-
sha1_smol = "1.0.0"
45+
const-sha1 = "0.2.0"
4646

4747
[target.'cfg(not(windows))'.dependencies]
4848
nix = { version = "0.24", default-features = false, features = ["user"] }

LICENSE-APACHE

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
174174
of your accepting any such warranty or additional liability.
175175

176176
END OF TERMS AND CONDITIONS
177-
178-
APPENDIX: How to apply the Apache License to your work.
179-
180-
To apply the Apache License to your work, attach the following
181-
boilerplate notice, with the fields enclosed by brackets "[]"
182-
replaced with your own identifying information. (Don't include
183-
the brackets!) The text should be enclosed in the appropriate
184-
comment syntax for the file format. We also recommend that a
185-
file or class name and description of purpose be included on the
186-
same "printed page" as the copyright notice for easier
187-
identification within third-party archives.
188-
189-
Copyright [yyyy] [name of copyright owner]
190-
191-
Licensed under the Apache License, Version 2.0 (the "License");
192-
you may not use this file except in compliance with the License.
193-
You may obtain a copy of the License at
194-
195-
http://www.apache.org/licenses/LICENSE-2.0
196-
197-
Unless required by applicable law or agreed to in writing, software
198-
distributed under the License is distributed on an "AS IS" BASIS,
199-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200-
See the License for the specific language governing permissions and
201-
limitations under the License.

LICENSE-MIT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Copyright (c) 2017-2022 by the respective authors
12
Copyright (c) 2016 Jorge Aparicio
23

34
Permission is hereby granted, free of charge, to any

deny.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
# only check for the targets we currently publish
3+
targets = [
4+
{ triple = "x86_64-apple-darwin" },
5+
{ triple = "x86_64-unknown-linux-gnu" },
6+
{ triple = "x86_64-unknown-linux-musl" },
7+
{ triple = "x86_64-pc-windows-msvc" },
8+
]
9+
10+
[advisories]
11+
vulnerability = "deny"
12+
unmaintained = "deny"
13+
notice = "deny"
14+
unsound = "deny"
15+
ignore = []
16+
17+
[bans]
18+
multiple-versions = "deny"
19+
deny = []
20+
21+
[sources]
22+
unknown-registry = "deny"
23+
unknown-git = "deny"
24+
allow-git = []
25+
26+
[licenses]
27+
unlicensed = "deny"
28+
allow-osi-fsf-free = "neither"
29+
copyleft = "deny"
30+
confidence-threshold = 0.93
31+
allow = ["Apache-2.0", "MIT", "CC0-1.0"]
32+
33+
[licenses.private]
34+
ignore = true

src/docker/custom.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,14 @@ impl<'a> Dockerfile<'a> {
114114
.file_name()
115115
.expect("workspace_root can't end in `..`")
116116
.to_string_lossy(),
117-
path_hash =
118-
sha1_smol::Sha1::from(&metadata.workspace_root.to_string_lossy().as_bytes())
119-
.digest()
120-
.to_string()
121-
.get(..5)
122-
.expect("sha1 is expected to be at least 5 characters long"),
117+
path_hash = format!(
118+
"{}",
119+
const_sha1::sha1(&const_sha1::ConstBuffer::from_slice(
120+
metadata.workspace_root.to_string_lossy().as_bytes()
121+
))
122+
)
123+
.get(..5)
124+
.expect("sha1 is expected to be at least 5 characters long"),
123125
custom = if matches!(self, Self::File { .. }) {
124126
""
125127
} else {

triagebot.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.

xtask/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ name = "xtask"
55
repository = "https://github.com/cross-rs/cross"
66
version = "0.0.0-dev.0"
77
edition = "2021"
8+
publish = false
89

910

1011
[dependencies]

0 commit comments

Comments
 (0)