cleanup working version

This commit is contained in:
Rick Farina (Zero_Chaos) 2025-12-12 18:55:33 -05:00
parent 5717cfffc1
commit 765d72a9f6
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC
3 changed files with 5 additions and 16 deletions

View file

@ -19,8 +19,8 @@ jobs:
uses: docker/setup-buildx-action@v3
-
name: List added files
run: git diff-tree --no-commit-id --name-only -r ${{ github.sha }}
run: git --no-pager diff --name-only "$(git rev-parse --verify origin/master 2> /dev/null)" HEAD
-
name: Pentoo Build Test
run: |
sudo docker build --progress=plain --build-arg github_sha="${{ github.sha }}" . -f scripts/qa/Dockerfile.build
sudo docker build --progress=plain . -f scripts/qa/Dockerfile.build

View file

@ -1,5 +1,4 @@
FROM pentoolinux/pentoo-full
ARG github_sha
# Setup repos
WORKDIR /var/db/repos/
# setup gentoo repo
@ -15,4 +14,4 @@ COPY . pentoo
WORKDIR /var/db/repos/pentoo
RUN ./scripts/qa/test-build $github_sha
RUN ./scripts/qa/test-build

View file

@ -1,17 +1,5 @@
#!/bin/bash
FAILED="0"
if [ -z "${1:-}" ]; then
printf 'Must pass github.sha as argument 1\n'
exit 1
fi
set -x
#if [ -z "$(git diff-tree --no-commit-id --name-only -r "${1}")" ]; then
if [ -z "$(git --no-pager diff --name-only "$(git rev-parse --verify origin/master 2> /dev/null)" HEAD)" ]; then
printf "No changed files detected, nothing to do\n"
exit 1
# this hits because the diff-tree command finds nothing despite working on my computer
fi
#for i in $(git diff-tree --no-commit-id --name-only -r "${1}"); do
for i in $(git --no-pager diff --name-only "$(git rev-parse --verify origin/master 2> /dev/null)" HEAD); do
if [ "${i%.ebuild}" != "${i}" ]; then
printf "%s looks like an ebuild, testing\n" "${i}"
@ -23,6 +11,8 @@ for i in $(git --no-pager diff --name-only "$(git rev-parse --verify origin/mast
printf '%s build FAILED\n' "${i}"
FAILED="1"
fi
else
printf '%s appears to be masked, skipping build test\n'
fi
fi
done