Update cargo-about to 0.6.6 and remove workaround to fail on warning (#25209)
See https://github.com/EmbarkStudios/cargo-about/issues/274 Release Notes: - N/A
This commit is contained in:
parent
121aba7106
commit
1087e05da4
2 changed files with 3 additions and 21 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
CARGO_ABOUT_VERSION="0.6.1"
|
||||
CARGO_ABOUT_VERSION="0.6.6"
|
||||
OUTPUT_FILE="${1:-$(pwd)/assets/licenses.md}"
|
||||
TEMPLATE_FILE="script/licenses/template.md.hbs"
|
||||
|
||||
|
@ -25,19 +25,10 @@ fi
|
|||
|
||||
echo "Generating cargo licenses"
|
||||
|
||||
stderr_file=$(mktemp)
|
||||
|
||||
cargo about generate \
|
||||
--fail \
|
||||
-c script/licenses/zed-licenses.toml \
|
||||
"${TEMPLATE_FILE}" \
|
||||
2> >(tee "$stderr_file") \
|
||||
>> $OUTPUT_FILE
|
||||
|
||||
if cat "$stderr_file" | grep -v "\[WARN\]" > /dev/null; then
|
||||
echo "Error: License check failed - warnings found" >&2
|
||||
exit 1
|
||||
fi
|
||||
"${TEMPLATE_FILE}" >> $OUTPUT_FILE
|
||||
|
||||
sed -i.bak 's/"/"/g' $OUTPUT_FILE
|
||||
sed -i.bak 's/'/'\''/g' $OUTPUT_FILE # The ` '\'' ` thing ends the string, appends a single quote, and re-opens the string
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
CARGO_ABOUT_VERSION="0.6.1"
|
||||
CARGO_ABOUT_VERSION="0.6.6"
|
||||
OUTPUT_FILE="${1:-$(pwd)/assets/licenses.csv}"
|
||||
TEMPLATE_FILE="script/licenses/template.csv.hbs"
|
||||
|
||||
|
@ -15,20 +15,11 @@ fi
|
|||
|
||||
echo "Generating cargo licenses"
|
||||
|
||||
stderr_file=$(mktemp)
|
||||
|
||||
cargo about generate \
|
||||
--fail \
|
||||
-c script/licenses/zed-licenses.toml \
|
||||
script/licenses/template.csv.hbs \
|
||||
2> >(tee "$stderr_file") \
|
||||
| awk 'NR==1{print;next} NF{print | "sort"}' \
|
||||
> $OUTPUT_FILE
|
||||
|
||||
# Check that there are no warnings.
|
||||
if echo "$about_stderr" | grep -v "\[WARN\]" > /dev/null; then
|
||||
echo "Error: License check failed - warnings found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "generate-licenses-csv completed. See $OUTPUT_FILE"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue