refactor: rename remaining c4 references to games
All checks were successful
CI / Deploy / test (pull_request) Successful in 16s
CI / Deploy / lint (pull_request) Successful in 25s
CI / Deploy / deploy (pull_request) Has been skipped

Update binary name, DB path, session cookie, deploy scripts, systemd
service, Docker config, CI workflow, and .dockerignore. Remove stale
Claude command and settings files.
This commit is contained in:
Ryan Hamamura
2026-03-02 21:16:12 -10:00
parent c6885a069b
commit 6d43bdea16
14 changed files with 64 additions and 109 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Build the c4 binary, bundle it with deploy files into a tarball,
# Build the games binary, bundle it with deploy files into a tarball,
# base64-encode it, and split into 25MB chunks for transfer.
set -euo pipefail
@@ -7,14 +7,14 @@ REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$REPO_DIR"
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
TARBALL="c4-deploy-${TIMESTAMP}.tar.gz"
BASE64_FILE="c4-deploy-${TIMESTAMP}_b64.txt"
TARBALL="games-deploy-${TIMESTAMP}.tar.gz"
BASE64_FILE="games-deploy-${TIMESTAMP}_b64.txt"
#==============================================================================
# Clean previous artifacts
#==============================================================================
echo "--- Cleaning old artifacts ---"
rm -f ./c4 c4-deploy-*.tar.gz c4-deploy-*_b64*.txt
rm -f ./games games-deploy-*.tar.gz games-deploy-*_b64*.txt
#==============================================================================
# Build
@@ -23,18 +23,18 @@ echo "--- Building CSS ---"
go tool gotailwind -i assets/css/input.css -o assets/css/output.css --minify
echo "--- Building binary (linux/amd64) ---"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o c4 .
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o games .
#==============================================================================
# Verify required files
#==============================================================================
echo "--- Verifying files ---"
REQUIRED_FILES=(
c4
games
deploy/setup.sh
deploy/deploy.sh
deploy/reassemble.sh
deploy/c4.service
deploy/games.service
)
for f in "${REQUIRED_FILES[@]}"; do
if [[ ! -f "$f" ]]; then
@@ -48,12 +48,12 @@ done
# Create tarball
#==============================================================================
echo "--- Creating tarball ---"
tar -czf "/tmp/${TARBALL}" --transform 's,^,c4/,' \
c4 \
tar -czf "/tmp/${TARBALL}" --transform 's,^,games/,' \
games \
deploy/setup.sh \
deploy/deploy.sh \
deploy/reassemble.sh \
deploy/c4.service
deploy/games.service
mv "/tmp/${TARBALL}" .
echo " -> ${TARBALL} ($(du -h "${TARBALL}" | cut -f1))"
@@ -66,10 +66,10 @@ base64 "${TARBALL}" > "${BASE64_FILE}"
echo " -> ${BASE64_FILE} ($(du -h "${BASE64_FILE}" | cut -f1))"
echo "--- Splitting into 25MB chunks ---"
split -b 25M -d --additional-suffix=.txt "${BASE64_FILE}" "c4-deploy-${TIMESTAMP}_b64_part"
split -b 25M -d --additional-suffix=.txt "${BASE64_FILE}" "games-deploy-${TIMESTAMP}_b64_part"
rm -f "${BASE64_FILE}"
CHUNKS=(c4-deploy-${TIMESTAMP}_b64_part*.txt)
CHUNKS=(games-deploy-${TIMESTAMP}_b64_part*.txt)
echo " -> ${#CHUNKS[@]} chunk(s):"
for chunk in "${CHUNKS[@]}"; do
echo " $chunk ($(du -h "$chunk" | cut -f1))"
@@ -83,5 +83,5 @@ echo "=== Package Complete ==="
echo ""
echo "Transfer the chunk files to the target server, then run:"
echo " ./reassemble.sh"
echo " cd ~/c4 && sudo ./deploy/setup.sh # first time only"
echo " cd ~/c4 && sudo ./deploy/deploy.sh"
echo " cd ~/games && sudo ./deploy/setup.sh # first time only"
echo " cd ~/games && sudo ./deploy/deploy.sh"