Skip to content

Commit 95770b7

Browse files
committed
Fix escaping issue in heredoc in Test actions workflow for debugging output
1 parent 73320ae commit 95770b7

2 files changed

Lines changed: 67 additions & 55 deletions

File tree

.github/workflows/test.yml

Lines changed: 60 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -195,59 +195,71 @@ jobs:
195195
echo "::endgroup::"
196196
197197
echo "::group::Restart Supabase REST container"
198-
bash -euo pipefail -c '
199-
project_id=$(grep -m1 "^project_id" suprabase/config.toml | awk -F '"' "{print \$2}")
200-
if [ -z "${project_id}" ]; then
201-
echo "Unable to determine Supabase project_id" >&2
202-
exit 1
203-
fi
204-
sanitize() {
205-
echo "$1" | tr "[:upper:]" "[:lower:]" | sed "s/[^a-z0-9]/-/g"
206-
}
207-
for candidate in "${project_id}" "$(sanitize "${project_id}")"; do
208-
rest_container=$(docker ps --filter "label=com.docker.compose.project=${candidate}" --format "{{.ID}} {{.Names}}" | grep -E "rest" | head -n 1 || true)
209-
if [ -n "${rest_container}" ]; then
210-
container_id=$(echo "${rest_container}" | awk "{print \$1}")
211-
container_name=$(echo "${rest_container}" | awk "{print \$2}")
212-
echo "Restarting ${container_name} (${container_id}) to refresh schema cache"
213-
docker restart "${container_id}"
214-
break
215-
fi
216-
done
217-
if [ -z "${rest_container:-}" ]; then
218-
echo "Supabase REST container not found; skipping restart" >&2
198+
bash <<'BASH'
199+
set -euo pipefail
200+
201+
project_id=$(grep -m1 '^project_id' suprabase/config.toml | awk -F'"' '{print $2}')
202+
if [ -z "${project_id}" ]; then
203+
echo "Unable to determine Supabase project_id" >&2
204+
exit 1
205+
fi
206+
207+
sanitize() {
208+
echo "$1" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g'
209+
}
210+
211+
rest_container=""
212+
for candidate in "${project_id}" "$(sanitize "${project_id}")"; do
213+
rest_container=$(docker ps --filter "label=com.docker.compose.project=${candidate}" --format '{{.ID}} {{.Names}}' | grep -E 'rest' | head -n 1 || true)
214+
if [ -n "${rest_container}" ]; then
215+
container_id=$(echo "${rest_container}" | awk '{print $1}')
216+
container_name=$(echo "${rest_container}" | awk '{print $2}')
217+
echo "Restarting ${container_name} (${container_id}) to refresh schema cache"
218+
docker restart "${container_id}"
219+
break
219220
fi
220-
'
221+
done
222+
223+
if [ -z "${rest_container}" ]; then
224+
echo "Supabase REST container not found; skipping restart" >&2
225+
fi
226+
BASH
221227
echo "::endgroup::"
222228
223229
echo "::group::Supabase container logs (last 200 lines)"
224-
bash -euo pipefail -c '
225-
project_id=$(grep -m1 "^project_id" suprabase/config.toml | awk -F '"' "{print \$2}")
226-
if [ -z "${project_id}" ]; then
227-
echo "Unable to determine Supabase project_id" >&2
228-
exit 1
229-
fi
230-
sanitize() {
231-
echo "$1" | tr "[:upper:]" "[:lower:]" | sed "s/[^a-z0-9]/-/g"
232-
}
233-
containers=""
234-
for candidate in "${project_id}" "$(sanitize "${project_id}")"; do
235-
containers=$(docker ps --filter "label=com.docker.compose.project=${candidate}" --format "{{.ID}} {{.Names}}" || true)
236-
if [ -n "${containers}" ]; then
237-
break
238-
fi
239-
done
240-
if [ -z "${containers}" ]; then
241-
echo "No Supabase containers found" >&2
242-
exit 0
230+
bash <<'BASH'
231+
set -euo pipefail
232+
233+
project_id=$(grep -m1 '^project_id' suprabase/config.toml | awk -F'"' '{print $2}')
234+
if [ -z "${project_id}" ]; then
235+
echo "Unable to determine Supabase project_id" >&2
236+
exit 1
237+
fi
238+
239+
sanitize() {
240+
echo "$1" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g'
241+
}
242+
243+
containers=""
244+
for candidate in "${project_id}" "$(sanitize "${project_id}")"; do
245+
containers=$(docker ps --filter "label=com.docker.compose.project=${candidate}" --format '{{.ID}} {{.Names}}' || true)
246+
if [ -n "${containers}" ]; then
247+
break
243248
fi
244-
echo "Capturing logs for project ${project_id}"
245-
echo "${containers}" | while read -r container_id container_name; do
246-
[ -z "${container_id}" ] && continue
247-
echo "--- ${container_name} (tail -n 200) ---"
248-
docker logs --tail 200 "${container_id}" || true
249-
done
250-
'
249+
done
250+
251+
if [ -z "${containers}" ]; then
252+
echo "No Supabase containers found" >&2
253+
exit 0
254+
fi
255+
256+
echo "Capturing logs for project ${project_id}"
257+
echo "${containers}" | while read -r container_id container_name; do
258+
[ -z "${container_id}" ] && continue
259+
echo "--- ${container_name} (tail -n 200) ---"
260+
docker logs --tail 200 "${container_id}" || true
261+
done
262+
BASH
251263
echo "::endgroup::"
252264
253265
- name: Start Astro dev server

src/lib/config/pwa.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ export const pwaConfig: PwaOptions = {
2424
manifestFilename: 'manifest.json',
2525
registerType: 'autoUpdate',
2626
manifest: {
27-
lang: 'en_US',
27+
background_color: '#f3f4f6',
28+
description: contactData.company.description,
2829
dir: 'ltr',
30+
display_override: ['window-controls-overlay'],
31+
display: 'browser',
32+
lang: 'en_US',
2933
name: contactData.company.name,
34+
orientation: 'natural',
3035
short_name: contactData.company.name,
31-
description: contactData.company.description,
32-
display_override: ['window-controls-overlay'],
33-
theme_color: manifestThemeColor,
34-
background_color: '#f3f4f6',
3536
start_url: '/index.html',
36-
display: 'standalone',
37-
orientation: 'natural',
37+
theme_color: manifestThemeColor,
3838
icons: [
3939
{
4040
src: '/icon-192.png',

0 commit comments

Comments
 (0)