File tree Expand file tree Collapse file tree 8 files changed +2405
-860
lines changed
Expand file tree Collapse file tree 8 files changed +2405
-860
lines changed Original file line number Diff line number Diff line change 66 CARGO_INCREMENTAL : ' 1'
77 CARGO_DENY_VERSION : 0.18.4
88 CARGO_AUDIT_VERSION : 0.21.2
9+ CARGO_ABOUT_VERSION : 0.8.2
910' on ' :
1011 push :
1112 branches :
@@ -362,7 +363,7 @@ jobs:
362363 uses : actions/cache@v4
363364 with :
364365 path : ~/.cargo/bin
365- key : ${{ runner.os }}-cargo-tools-deny-${{ env.CARGO_DENY_VERSION }}-audit-${{ env.CARGO_AUDIT_VERSION }}
366+ key : ${{ runner.os }}-cargo-tools-deny-${{ env.CARGO_DENY_VERSION }}-audit-${{ env.CARGO_AUDIT_VERSION }}-about-${{ env.CARGO_ABOUT_VERSION }}
366367 restore-keys : |
367368 ${{ runner.os }}-cargo-tools-
368369
@@ -378,8 +379,27 @@ jobs:
378379 cargo install --locked --version ${{ env.CARGO_AUDIT_VERSION }} cargo-audit
379380 fi
380381
382+ - name : Install cargo-about
383+ run : |
384+ if ! command -v cargo-about &> /dev/null; then
385+ cargo install --locked --version ${{ env.CARGO_ABOUT_VERSION }} cargo-about
386+ fi
387+
381388 - name : Run cargo deny
382389 run : cargo deny check
383390
384391 - name : Run cargo audit
385392 run : cargo audit
393+
394+ - name : Verify LICENSE-3RD-PARTY.txt is up to date
395+ run : |
396+ cargo about generate --frozen about.hbs > LICENSE-3RD-PARTY-generated.txt
397+ if ! diff -q LICENSE-3RD-PARTY.txt LICENSE-3RD-PARTY-generated.txt > /dev/null; then
398+ echo "ERROR: LICENSE-3RD-PARTY.txt is not up to date!"
399+ echo "Please run: cargo about generate about.hbs > LICENSE-3RD-PARTY.txt"
400+ echo "Differences found:"
401+ diff LICENSE-3RD-PARTY.txt LICENSE-3RD-PARTY-generated.txt || true
402+ exit 1
403+ fi
404+ rm LICENSE-3RD-PARTY-generated.txt
405+ echo "LICENSE-3RD-PARTY.txt is up to date"
Original file line number Diff line number Diff line change 117117# Added by cargo
118118
119119/target
120- Cargo.lock
121120
122121* .node
123122.pnp. *
Original file line number Diff line number Diff line change @@ -101,10 +101,10 @@ This verifies that all dependencies use acceptable licenses and checks for known
101101We use [ ` cargo-about ` ] ( https://github.com/EmbarkStudios/cargo-about ) to generate our third-party licenses notice:
102102
103103``` sh
104- cargo about generate about.hbs > license.html
104+ cargo about generate --frozen about.hbs > LICENSE-3RD-PARTY.txt
105105```
106106
107- This generates an HTML file containing all third-party license information for our dependencies.
107+ This generates the file containing all third-party license information for our dependencies.
108108
109109## Submitting Your Changes
110110
You can’t perform that action at this time.
0 commit comments