Update cargo-about to 0.6.6 and remove workaround to fail on warning (#25209)

Michael Sloan created

See https://github.com/EmbarkStudios/cargo-about/issues/274

Release Notes:

- N/A

Change summary

script/generate-licenses     | 13 ++-----------
script/generate-licenses-csv | 11 +----------
2 files changed, 3 insertions(+), 21 deletions(-)

Detailed changes

script/generate-licenses 🔗

@@ -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

script/generate-licenses-csv 🔗

@@ -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"