mirror of
https://github.com/eternal-flame-AD/unitdc-rs.git
synced 2024-11-30 22:36:44 -06:00
31 lines
566 B
Bash
Executable file
31 lines
566 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
mkdir -p ci-tmp
|
|
|
|
ensure_cargo_bin() {
|
|
if ! command -v "$1" &> /dev/null; then
|
|
if [ -z "$2" ]; then
|
|
(cd /tmp && cargo install $1)
|
|
else
|
|
(cd /tmp && cargo install $2)
|
|
fi
|
|
fi
|
|
}
|
|
|
|
cmp_output() {
|
|
if ! diff -u $1 $2; then
|
|
echo "License check failed"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
ensure_cargo_bin cargo-license
|
|
ensure_cargo_bin cargo-deny
|
|
|
|
cargo license --color never > ci-tmp/LICENSE-dependencies-latest
|
|
|
|
cmp_output LICENSE-dependencies ci-tmp/LICENSE-dependencies-latest
|
|
|
|
cargo deny check
|