Skip to content

Commit

Permalink
ci: reproducible license sort
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-grande committed Jul 8, 2024
1 parent 49fb82a commit 6eb13fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ jobs:
- name: Install OS packages
# yamllint disable-line rule:line-length
run: sudo apt-get install -y $(cat dependencies/debian.txt)
- name: Show how licenses are rendered order
run: |
reuse --root salt/dom0 lint || true
./scripts/spec-get.sh dom0 license
./scripts/spec-get.sh dom0 license_csv
./scripts/spec-gen.sh test dom0
- name: Remove externally managed python environment flag
# yamllint disable-line rule:line-length
run: sudo dpkg-divert --rename --add /usr/lib/$(py3versions -d)/EXTERNALLY-MANAGED
Expand Down
4 changes: 2 additions & 2 deletions scripts/spec-get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ fi

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

Expand Down

0 comments on commit 6eb13fa

Please sign in to comment.