mirror of
https://github.com/Sea-Haven-Industries/front-integrations.git
synced 2026-09-30 07:13:12 +00:00
18 lines
495 B
Bash
18 lines
495 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
# Terraform external data source entrypoint. Stdout must be JSON only.
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
||
|
|
"${ROOT}/build_packages.sh" >&2
|
||
|
|
|
||
|
|
hash="$(
|
||
|
|
{
|
||
|
|
# -P: do not follow symlinks; only hash regular files under build/.
|
||
|
|
find -P "${ROOT}/build/sla_monitor" "${ROOT}/build/user_sync" -type f -print0 2>/dev/null \
|
||
|
|
| sort -z \
|
||
|
|
| xargs -0 sha256sum
|
||
|
|
} | sha256sum | awk '{print $1}'
|
||
|
|
)"
|
||
|
|
|
||
|
|
printf '{"status":"ok","hash":"%s"}\n' "${hash}"
|