From 666262b018805b1d9cb58663cf9f80f811925ca5 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 19 Oct 2023 16:43:02 +0200 Subject: [PATCH] Make sure no release contains thirdparty libraries --- .github/workflows/clean-vendor.yml | 26 ++++++++++++++++++++++++++ bin/make-release.sh | 6 ++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/clean-vendor.yml diff --git a/.github/workflows/clean-vendor.yml b/.github/workflows/clean-vendor.yml new file mode 100644 index 0000000..7e61e23 --- /dev/null +++ b/.github/workflows/clean-vendor.yml @@ -0,0 +1,26 @@ +name: Clean Vendor Check + +on: + push: + branches: + - stable/* + +jobs: + check-vendor: + name: Clean Vendor Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code base + uses: actions/checkout@v3 + + - name: Check If Vendor Is Clean + run: | + files=`find vendor -maxdepth 1 -type d -not -name "ipl" -not -name "fortawesome" -not -name "composer" -not -name "vendor"` + if [ -z "$files" ]; then + echo "No unknown vendor files found"; + exit 0; + else + echo "Found unknown vendor files: $files"; + exit 1; + fi diff --git a/bin/make-release.sh b/bin/make-release.sh index 0cc9a6c..9395242 100755 --- a/bin/make-release.sh +++ b/bin/make-release.sh @@ -53,6 +53,12 @@ rm -rf vendor git checkout vendor composer validate --no-check-all --strict || fail "Composer validate failed" +UNKNOWN_VENDOR_FILES=$(find vendor -maxdepth 1 -type d -not -name "ipl" -not -name "fortawesome" -not -name "composer" -not -name "vendor") +if [ -n "$UNKNOWN_VENDOR_FILES" ]; then + echo "Unknown vendor files found! DO NOT TAG!" + exit 1 +fi + if [ -z "$NO_OPT" ]; then git tag -a v$VERSION -m "Version v$VERSION" echo "Finished, tagged v$VERSION"