- Introduce clear directory separation for docker, infra, ci, and config - Add CloudFormation pipeline for S3 → CodeBuild → ECR - Implement explicit artifact build script for flat deployment zip - Provide example runtime configuration and ignore secrets
23 lines
600 B
Bash
Executable file
23 lines
600 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
ARTIFACT_DIR="${ROOT_DIR}/artifacts"
|
|
ZIP_PATH="${ARTIFACT_DIR}/forgejo-source.zip"
|
|
|
|
mkdir -p "${ARTIFACT_DIR}"
|
|
|
|
tmpdir="$(mktemp -d)"
|
|
trap 'rm -rf "${tmpdir}"' EXIT
|
|
|
|
cp "${ROOT_DIR}/docker/Dockerfile" "${tmpdir}/Dockerfile"
|
|
cp "${ROOT_DIR}/docker/entrypoint.sh" "${tmpdir}/entrypoint.sh"
|
|
cp "${ROOT_DIR}/config/app.ini" "${tmpdir}/app.ini"
|
|
cp "${ROOT_DIR}/ci/buildspec.yml" "${tmpdir}/buildspec.yml"
|
|
|
|
(
|
|
cd "${tmpdir}"
|
|
zip -r "${ZIP_PATH}" .
|
|
)
|
|
|
|
echo "Artifact created: ${ZIP_PATH}"
|