mirror of
https://github.com/Sea-Haven-Industries/seahaven-door-unlock-api.git
synced 2026-10-04 18:22:06 +00:00
Move deploy off frozen CDK CD onto an HCP workspace that recreates the HTTP API, five Lambdas, disabled EventBridge rules, and alarms in seahaven-prod without a poller VPC.
22 lines
484 B
Bash
Executable file
22 lines
484 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
|
|
|
|
if command -v sha256sum >/dev/null 2>&1; then
|
|
SHA=(sha256sum)
|
|
else
|
|
SHA=(shasum -a 256)
|
|
fi
|
|
|
|
hash="$(
|
|
{
|
|
find -P "${ROOT}/build" -type f -print0 2>/dev/null \
|
|
| sort -z \
|
|
| xargs -0 "${SHA[@]}"
|
|
} | "${SHA[@]}" | awk '{print $1}'
|
|
)"
|
|
|
|
printf '{"status":"ok","hash":"%s"}\n' "${hash}"
|