Skip to content

Commit 6779447

Browse files
committed
Added more logging since _toobard.html.erb check is failing without a meaningful message
1 parent de3b554 commit 6779447

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,22 +145,20 @@ jobs:
145145
run: |
146146
set -euo pipefail
147147
148-
csum="$(docker compose exec -T app sh -lc '
149-
upstream="$(find /opt/app/data/tmp -type f -path "*/webapp/WEB-INF/app/views/resources/_toolbar.html.erb" | head -n1)"
150-
if [ -z "$upstream" ]; then
151-
echo "__MISSING__"
152-
exit 0
153-
fi
154-
diff "$upstream" /opt/app/plugins/local/frontend/views/resources/_toolbar.html.erb | sha256sum | cut -f1 -d" "
155-
')"
156-
157-
if [[ "$csum" == "__MISSING__" ]]; then
148+
upstream="$(docker compose exec -T app sh -lc 'find /opt/app/data/tmp -type f -path "*/webapp/WEB-INF/app/views/resources/_toolbar.html.erb" | head -n1')"
149+
if [[ -z "$upstream" ]]; then
158150
echo "Could not find extracted upstream _toolbar.html.erb under /opt/app/data/tmp"
151+
docker compose exec -T app sh -lc 'ls -la /opt/app/data/tmp || true'
159152
exit 1
160153
fi
161154
155+
diff_output="$(docker compose exec -T app sh -lc "diff '$upstream' /opt/app/plugins/local/frontend/views/resources/_toolbar.html.erb || true")"
156+
csum="$(printf '%s' "$diff_output" | sha256sum | cut -f1 -d' ')"
157+
echo "Toolbar diff checksum: $csum"
158+
162159
if [[ "$csum" != "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ]]; then
163-
echo "resources/toolbar.html.erb checksum differs. We override this file in plugins so probably needs to be compared and updated"
160+
echo "resources/_toolbar.html.erb differs from upstream extracted WAR file"
161+
printf '%s\n' "$diff_output" | head -n 120
164162
exit 1
165163
fi
166164

0 commit comments

Comments
 (0)