Use uglifyjs on CentOS too

Only checking for ID to equal "rhel" causes build failures on CentOS
Stream.  Instead check both ID and ID_LIKE.  This should also work later
on when rebuilds like CentOS Linux get this update.

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Carl George 2020-12-18 23:27:26 -06:00 committed by Alexander Bokovoy
parent 8c681a494a
commit 6ae1a05ee1

View File

@ -111,7 +111,7 @@ fi
# compile using python rjsmin on most platforms and uglify-js on RHEL 8
echo "Minimizing: $RDIR/$RELEASE/$LAYER.js"
echo "Target file: $OUTPUT_FILE"
if [ $ID = "rhel" ]; then
if [[ "$ID" == "rhel" ]] || [[ "$ID_LIKE" =~ "rhel" ]]; then
echo "Minifier: uglifyjs"
uglifyjs < $RDIR/$RELEASE/$LAYER.js > $OUTPUT_FILE
else