yet another way to diff

This commit is contained in:
Rick Farina (Zero_Chaos) 2025-12-12 18:20:31 -05:00
parent a18beabe77
commit 56834d9d2e
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC
2 changed files with 2 additions and 6 deletions

View file

@ -13,10 +13,6 @@ COPY . pentoo
#Revisit if this is worth running when we have >2 emerge calls
#RUN time FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" emerge --regen --jobs=$(nproc) --quiet
# disable minimal (pentoo-core is default minimal)
RUN cat /etc/portage/make.conf
RUN sed -i 's# pentoo-minimal##' /etc/portage/make.conf
WORKDIR /var/db/repos/pentoo
RUN ./scripts/qa/test-build $github_sha

View file

@ -6,13 +6,13 @@ if [ -z "${1:-}" ]; then
fi
set -x
#if [ -z "$(git diff-tree --no-commit-id --name-only -r "${1}")" ]; then
if [ -z "$(git diff --name-only HEAD@{0} HEAD@{1})" ]; then
if [ -z "$(git --no-pager diff --name-only $(git rev-parse --verify master) 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 diff --name-only HEAD@{0} HEAD@{1}); do
for i in $(git --no-pager diff --name-only $(git rev-parse --verify master) HEAD); do
if [ "${i%.ebuild}" != "${i}" ]; then
printf "%s looks like an ebuild, testing\n" "${i}"
if FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" emerge --getbinpkg=y --buildpkg=n --jobs="$(nproc)" --load-average="$(nproc)" --verbose "$(printf '%s' "${i%.ebuild}" | awk -F'/' '{print "="$1"/"$3}')" --pretend; then