fix: resolve retired/preview gemini model routing and test configuration errors
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled

This commit is contained in:
2026-06-18 13:32:34 +00:00
parent 73a82e6175
commit 25e246061f
16 changed files with 227 additions and 43 deletions
Regular → Executable
+13 -11
View File
@@ -1,23 +1,25 @@
#!/bin/bash
# Define the service name/path for easy updates
set -e
BINARY_NAME="gophergate"
SOURCE_PATH="./cmd/gophergate/main.go"
echo "Stopping existing $BINARY_NAME processes..."
# Using pkill; || true ensures the script continues even if no process was found
pkill -9 "$BINARY_NAME" || echo "No running process found."
echo "Pulling latest changes from git..."
git stash || true
git pull
echo "Building the application..."
if go build -o "$BINARY_NAME" "$SOURCE_PATH"; then
echo "Build successful. Starting $BINARY_NAME in the background..."
# Launch with nohup and redirect output to a log file
nohup "./$BINARY_NAME" > gophergate.log 2>&1 &
echo "Service started. PID: $!"
go build -o "$BINARY_NAME" "$SOURCE_PATH"
echo "Restarting service..."
systemctl restart gophergate
sleep 2
if systemctl is-active --quiet gophergate; then
echo "Deploy complete. Service is running."
systemctl status gophergate --no-pager | head -5
else
echo "Build failed! Keeping the previous state."
echo "Service failed to start! Check: journalctl -u gophergate -n 20"
exit 1
fi