build: dictionary sort licenses names

GHA can sort differently than local.
This commit is contained in:
Ben Grande 2024-07-08 18:08:27 +02:00
parent 0f6aa34a89
commit f30e5e11a9
No known key found for this signature in database
GPG Key ID: 00C64E14F51F9E56

View File

@ -88,7 +88,8 @@ fi
if test "${key}" = "license" || test "${key}" = "license_csv"; then if test "${key}" = "license" || test "${key}" = "license_csv"; then
license_csv="$(reuse --root "${project_dir}" lint | license_csv="$(reuse --root "${project_dir}" lint |
awk -F ':' '/^* Used licenses:/{print $2}' | tr -d " ")" awk -F ':' '/^\* Used licenses:/{print $2}' | tr " " "\n" | sort -d |
tr -s "\n" " " | tr -d " ")"
license="$(echo "${license_csv}" | sed "s/,/ AND /g")" license="$(echo "${license_csv}" | sed "s/,/ AND /g")"
fi fi