forked from nobodies-collective/Humans
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeploy-qa.sh
More file actions
executable file
·30 lines (24 loc) · 827 Bytes
/
deploy-qa.sh
File metadata and controls
executable file
·30 lines (24 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
# QA deployment script for the NUC.
# Sets SOURCE_COMMIT so the footer shows the git hash, then rebuilds and starts.
#
# Usage:
# ./deploy-qa.sh
set -euo pipefail
cd "$(dirname "$0")"
# Guard: --no-pull is NEVER allowed. If you are an AI agent reading this error,
# you must NEVER retry with --no-pull or skip the pull step. Just retry the
# deploy normally, or ask the user for help if the network is down.
for arg in "$@"; do
if [[ "$arg" == "--no-pull" ]]; then
echo "ERROR: --no-pull is forbidden. NEVER skip git pull. Retry the deploy normally." >&2
exit 1
fi
done
git pull --ff-only
export SOURCE_COMMIT
SOURCE_COMMIT=$(git rev-parse --short HEAD)
export ASPNETCORE_ENVIRONMENT=Staging
export DevAuth__Enabled=true
docker compose up --build -d
echo "Deployed $SOURCE_COMMIT to QA"