Fixes to deployment

This commit is contained in:
2025-02-16 22:58:57 +11:00
parent 8ca99bca67
commit ad2f09457c
3 changed files with 5 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ jobs:
run: make test run: make test
- name: Build the binary - name: Build the binary
run: make build run: make build SUFFIX=-staging-$GITHUB_SHA
- name: Deploy to Server - name: Deploy to Server
env: env:

View File

@@ -7,7 +7,7 @@ build:
go mod tidy && \ go mod tidy && \
templ generate && \ templ generate && \
go generate && \ go generate && \
go build -ldflags="-w -s" -o ${BINARY_NAME} go build -ldflags="-w -s" -o ${BINARY_NAME}${SUFFIX}
dev: dev:
templ generate --watch &\ templ generate --watch &\
@@ -19,11 +19,11 @@ tester:
go run . --port 3232 --test --loglevel trace go run . --port 3232 --test --loglevel trace
test: test:
rm -f **/.projectreshoot-test-database.db rm -f **/.projectreshoot-test-database.db && \
go mod tidy && \ go mod tidy && \
templ generate && \ templ generate && \
go generate && \ go generate && \
go test ./... go test ./middleware
clean: clean:
go clean go clean

View File

@@ -13,7 +13,7 @@ COMMIT_HASH=$1
RELEASES_DIR="/home/deploy/releases/staging" RELEASES_DIR="/home/deploy/releases/staging"
DEPLOY_BIN="/home/deploy/staging/projectreshoot" DEPLOY_BIN="/home/deploy/staging/projectreshoot"
SERVICE_NAME="staging.projectreshoot" SERVICE_NAME="staging.projectreshoot"
BINARY_NAME="projectreshoot-${COMMIT_HASH}" BINARY_NAME="projectreshoot-staging-${COMMIT_HASH}"
declare -a PORTS=("3005" "3006" "3007") declare -a PORTS=("3005" "3006" "3007")
# Check if the binary exists # Check if the binary exists