Skip to content

Commit

Permalink
fixup! fixup! fixup! Check dependency licenses in CIs
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrobdod committed Apr 11, 2024
1 parent 2463ea8 commit 3261b92
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 35 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.awk text diff=awk
*.md text diff=markdown
*.png binary diff=png -filter
*.rs text diff=rust filter=rustfmt
Expand Down
16 changes: 16 additions & 0 deletions .github/license-acceptable.awk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
BEGIN {FS="\t"}
{
isAcceptable=0
split($5, licenseOptions, " OR ")
for (i in licenseOptions) {
isAcceptable = isAcceptable ||
licenseOptions[i] == "Apache-2.0" ||
licenseOptions[i] == "BSD-3-Clause" ||
licenseOptions[i] == "license"
}
if (! isAcceptable) {
print($1)
print($5)
exit 3
}
}
20 changes: 1 addition & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,4 @@ jobs:
- name: Check licenses
run: >
cargo license --tsv |
awk -e '
BEGIN {FS="\t"}
{
isAcceptable=0
split($5, licenseOptions, " OR ")
for (i in licenseOptions) {
isAcceptable = isAcceptable ||
licenseOptions[i] == "Apache-2.0" ||
licenseOptions[i] == "BSD-3-Clause" ||
licenseOptions[i] == "MIT" ||
licenseOptions[i] == "license"
}
if (! isAcceptable) {
print($1)
print($5)
exit 3
}
}
'
awk -f ../license-acceptable.awk
18 changes: 2 additions & 16 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,9 @@ test_script:

- ps: 'cargo fmt --all -- --check'

- ps: |
- ps: >
cargo license --tsv |
awk -e '
BEGIN {FS="\t"}
{
isAcceptable=0
split($5, licenseOptions, " OR ")
for (i in licenseOptions) {
isAcceptable = isAcceptable || licenseOptions[i] == "license" || licenseOptions[i] == "MIT" || licenseOptions[i] == "Apache-2.0"
}
if (! isAcceptable) {
print($1)
print($5)
exit 3
}
}
'
awk -f .github/license-acceptable.awk
- ps: './target/release/png_inflate --version'
artifacts:
Expand Down

0 comments on commit 3261b92

Please sign in to comment.