mirror of
https://github.com/Sea-Haven-Industries/forgejo.git
synced 2026-09-30 10:03:11 +00:00
Move the prod host onto workspace forgejo-prod in the After Hours VPC and freeze CDK push deploys so cutover can happen without applying into seahaven-prod.
22 lines
496 B
Bash
22 lines
496 B
Bash
#!/usr/bin/env bash
|
|
# Terraform external data source entrypoint. Stdout must be JSON only.
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
|
bash "${ROOT}/build_lambda.sh" >&2
|
|
|
|
if command -v sha256sum >/dev/null 2>&1; then
|
|
SHA=(sha256sum)
|
|
else
|
|
SHA=(shasum -a 256)
|
|
fi
|
|
|
|
hash="$(
|
|
{
|
|
find -P "${ROOT}/build/function" -type f -print0 2>/dev/null \
|
|
| sort -z \
|
|
| xargs -0 "${SHA[@]}"
|
|
} | "${SHA[@]}" | awk '{print $1}'
|
|
)"
|
|
|
|
printf '{"status":"ok","hash":"%s"}\n' "${hash}"
|