mirror of
https://github.com/Sea-Haven-Industries/procurement-ingest.git
synced 2026-09-30 11:53:13 +00:00
25 lines
698 B
Bash
Executable file
25 lines
698 B
Bash
Executable file
#!/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="$(
|
|
{
|
|
find -P \
|
|
"${ROOT}/build/po_email_processor" \
|
|
"${ROOT}/build/po_web_ui" \
|
|
"${ROOT}/build/po_site_extractor" \
|
|
"${ROOT}/build/wo_email_processor" \
|
|
"${ROOT}/build/wo_web_ui" \
|
|
"${ROOT}/build/wo_shoc_emitter" \
|
|
"${ROOT}/build/wo_shoc_hmac_rotator" \
|
|
"${ROOT}/build/procurement_api" \
|
|
-type f -print0 2>/dev/null \
|
|
| sort -z \
|
|
| xargs -0 sha256sum
|
|
} | sha256sum | awk '{print $1}'
|
|
)"
|
|
|
|
printf '{"status":"ok","hash":"%s"}\n' "${hash}"
|