Skip to content

Commit

Permalink
Use cargo-about 0.6.0 to produce acknowledgements
Browse files Browse the repository at this point in the history
The new version introduced a couple changes that are reflected here:

- Rename override_git_commit -> override-git-commit in about.toml since
that's now the canonical spelling.
- Regenerate the license list since a bug was fixed that changed the
semantics of the count.

Also pin the version in our documentation and in the script to prevent
differences in behavior depending on when cargo-about was installed on
developer machines.
  • Loading branch information
akonradi-signal committed Dec 13, 2023
1 parent 240a016 commit f6217f2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ringrtc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v4
- run: rustup toolchain install $(cat rust-toolchain) --profile minimal --component clippy --target aarch64-linux-android,aarch64-apple-ios
- name: Install extra Rust tools
run: cargo +stable install --version 0.5.6 --locked cargo-about
run: cargo +stable install --version 0.6.0 --locked cargo-about
- run: shellcheck **/*.sh bin/build-aar bin/build-call_sim-cli bin/build-cli bin/build-electron bin/build-gctc bin/build-ios bin/build-javadoc bin/build-rustdoc bin/build-target bin/fetch-artifact bin/gsync-webrtc bin/prepare-workspace bin/rust-lint-check bin/set-up-for-cocoapods src/rust/scripts/run-tests
# Skip the Python scripts not written with flake8 style. (Try not to add more.)
- run: cd bin && python3 -m flake8 . --exclude measure-cpu.py
Expand Down
2 changes: 1 addition & 1 deletion acknowledgments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This directory contains pre-generated acknowledgments for the Rust dependencies
If you update RingRTC's dependencies, you'll need to update this listing. Install [cargo-about][] if you haven't already:

```shell
cargo +stable install --locked cargo-about
cargo +stable install --locked cargo-about --version 0.6.0
```

Then:
Expand Down
6 changes: 3 additions & 3 deletions acknowledgments/about.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,23 @@ checksum = "0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0"
# The prost-* crates are embedded in a larger repo.
[prost-build.clarify]
license = "Apache-2.0"
override_git_commit = "v0.9.0"
override-git-commit = "v0.9.0"

[[prost-build.clarify.git]]
path = "LICENSE"
checksum = "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2"

[prost-derive.clarify]
license = "Apache-2.0"
override_git_commit = "v0.9.0"
override-git-commit = "v0.9.0"

[[prost-derive.clarify.git]]
path = "LICENSE"
checksum = "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2"

[prost-types.clarify]
license = "Apache-2.0"
override_git_commit = "v0.9.0"
override-git-commit = "v0.9.0"

[[prost-types.clarify.git]]
path = "LICENSE"
Expand Down
6 changes: 3 additions & 3 deletions acknowledgments/acknowledgments.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ <h1>Third Party Licenses</h1>

<h2>Overview of licenses:</h2>
<ul class="licenses-overview">
<li><a href="#MIT">MIT License</a> (54)</li>
<li><a href="#MIT">MIT License</a> (107)</li>
<li><a href="#AGPL-3.0">GNU Affero General Public License v3.0</a> (6)</li>
<li><a href="#Apache-2.0">Apache License 2.0</a> (5)</li>
<li><a href="#BSD-3-Clause">BSD 3-Clause &quot;New&quot; or &quot;Revised&quot; License</a> (4)</li>
<li><a href="#AGPL-3.0">GNU Affero General Public License v3.0</a> (2)</li>
<li><a href="#Apache-2.0">Apache License 2.0</a> (2)</li>
<li><a href="#ISC">ISC License</a> (1)</li>
<li><a href="#Unicode-DFS-2016">Unicode License Agreement - Data Files and Software (2016)</a> (1)</li>
</ul>
Expand Down
10 changes: 10 additions & 0 deletions bin/regenerate_acknowledgments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ set -euo pipefail
SCRIPT_DIR=$(dirname "$0")
cd "${SCRIPT_DIR}"/..

echo "Checking cargo-about version"
VERSION=$(cargo about --version)
echo "Found $VERSION"

EXPECTED_VERSION="cargo-about 0.6.0"
if [ "$VERSION" != "$EXPECTED_VERSION" ]; then
echo "This tool works with $EXPECTED_VERSION but $VERSION is installed"
false
fi

for template in acknowledgments/*.hbs; do
template_basename=$(basename "${template%.hbs}")
echo "Generating ${template_basename}" ... >&2
Expand Down

0 comments on commit f6217f2

Please sign in to comment.