From 4fa7a64f181fc5749c27492810182a3eef4ba2c4 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Thu, 26 Oct 2023 19:05:39 -0300 Subject: [PATCH] build: add sort-profiles target for sort.py And use it in CI. Note: The target currently always runs sort.py for all profiles. Before: $ ./ci/check/profiles/sort.py etc/inc/*.inc etc/profile*/*.profile After: $ make sort-profiles --- .github/workflows/check-profiles.yml | 11 ++++------- Makefile | 4 ++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-profiles.yml b/.github/workflows/check-profiles.yml index 3405a87e1..86b74d0ad 100644 --- a/.github/workflows/check-profiles.yml +++ b/.github/workflows/check-profiles.yml @@ -43,15 +43,12 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 - name: print env run: ./ci/printenv.sh + - name: configure + run: ./configure || (cat config.log; exit 1) - run: python3 --version - - name: sort.py - run: > - set +e; - ./ci/check/profiles/sort.py - etc/inc/*.inc etc/profile*/*.profile - echo; - git diff --exit-code + - name: sort profiles + run: make sort-profiles || (echo; git diff --exit-code) # Currently broken (see #5610) # - name: private-etc-always-required.sh # run: > diff --git a/Makefile b/Makefile index f81f3b9c7..e8a501dbb 100644 --- a/Makefile +++ b/Makefile @@ -410,6 +410,10 @@ print-env: installcheck: config.mk command -V $(TARNAME) && $(TARNAME) --version +.PHONY: sort-profiles +sort-profiles: $(PROFILES_INC) $(PROFILES_PRO) + @./ci/check/profiles/sort.py $(PROFILES_INC) $(PROFILES_PRO) + # # make test #