From 12ed25c292d470c32cfbed627e32943bf9ddade2 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 23 Aug 2023 11:26:47 -0500 Subject: [PATCH] send details of package sha contents to stderr for debugability (cherry picked from commit 191927d2d9dc9c6928e8eb9f7ae0713f73503763) --- ci/package-sha.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci/package-sha.sh b/ci/package-sha.sh index 6812fab89..0cb5a8426 100755 --- a/ci/package-sha.sh +++ b/ci/package-sha.sh @@ -7,12 +7,18 @@ COMPUTED_ROOT="$(readlink -e "$(dirname "$0")/../../")" NTECH_ROOT=${NTECH_ROOT:-$COMPUTED_ROOT} CORE_SHA=$(git -C "${NTECH_ROOT}/core" log --pretty='format:%h' -1 -- .) +echo "CORE_SHA: ${CORE_SHA}" >&2 ENTERPRISE_SHA=$(git -C "${NTECH_ROOT}/enterprise" log --pretty='format:%h' -1 -- .) +echo "ENTERPRISE_SHA: ${ENTERPRISE_SHA}" >&2 NOVA_SHA=$(git -C "${NTECH_ROOT}/nova" log --pretty='format:%h' -1 -- .) +echo "NOVA_SHA: ${NOVA_SHA}" >&2 MASTERFILES_SHA=$(git -C "${NTECH_ROOT}/masterfiles" log --pretty='format:%h' -1 -- .) +echo "MASTERFILES_SHA: ${MASTERFILES_SHA}" >&2 # notice below the sha is more complex, a todo is to make "code only" shas for each repo ENT-10443 MISSION_PORTAL_SHA=$(find "${NTECH_ROOT}/mission-portal" -type f -and \( -path "./application/*" -or -path "./public/*" -or -path "./phpcfenginenova/*" -or -path "./ldap/*" -or -path "./composer.json" -or -path "./package.json" -or -path "./static/*" \) -print0 | xargs -0 sha1sum | awk '{print $1}' | sha1sum | cut -c -8) +echo "MISSION_PORTAL_SHA: ${MISSION_PORTAL_SHA}" >&2 BUILDSCRIPTS_SHA=$(find "${NTECH_ROOT}/buildscripts" -type f -and \( -path "./deps-packaging/*" -or -path "./build-scripts/*" -or -path "./packaging/*" \) -print0 | xargs -0 sha1sum | awk '{print $1}' | sha1sum | cut -c -8) +echo "BUILDSCRIPTS_SHA: ${BUILDSCRIPTS_SHA}" >&2 PACKAGE_SHA=$(echo "$CORE_SHA" "$ENTERPRISE_SHA" "$NOVA_SHA" "$MASTERFILES_SHA" "$MISSION_PORTAL_SHA" "$BUILDSCRIPTS_SHA" | sha256sum | cut -d' ' -f1 | cut -c -8) echo "$PACKAGE_SHA"