From d36a8bec21076f12bfad8682fae011c4520850d1 Mon Sep 17 00:00:00 2001 From: hxt Date: Thu, 10 Jul 2025 20:28:08 +0800 Subject: [PATCH] =?UTF-8?q?ci(drone):=20=E6=B7=BB=E5=8A=A0=20Go=20?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=92=8C=E6=9E=84=E5=BB=BA=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 restore cache 和 rebuild cache 步骤中添加了 go-mod-cache 和 go --- scripts/start.bat | 49 ----------------------------------------------- scripts/start.sh | 47 --------------------------------------------- 2 files changed, 96 deletions(-) delete mode 100644 scripts/start.bat delete mode 100644 scripts/start.sh diff --git a/scripts/start.bat b/scripts/start.bat deleted file mode 100644 index caafeda..0000000 --- a/scripts/start.bat +++ /dev/null @@ -1,49 +0,0 @@ -@echo off -chcp 65001 >nul - -echo ========================================== -echo Epic Game Web Service -echo Starting with cron jobs enabled... -echo ========================================== - -REM 检查Go环境 -go version >nul 2>&1 -if errorlevel 1 ( - echo Error: Go is not installed or not in PATH - pause - exit /b 1 -) - -REM 检查Go版本 -for /f "tokens=3" %%i in ('go version') do set GO_VERSION=%%i -echo Go version: %GO_VERSION% - -REM 设置环境变量 -set GO_ENV=production -set GF_GCFG_FILE=manifest/config/config.yaml - -REM 清理旧的构建文件 -echo Cleaning old build files... -if exist main.exe del main.exe -if exist main del main - -REM 构建项目 -echo Building project... -go build -o main.exe . - -if errorlevel 1 ( - echo Error: Build failed - pause - exit /b 1 -) - -echo Build successful! - -REM 启动服务 -echo Starting server on port 8283... -echo Cron jobs will be started automatically... -echo Press Ctrl+C to stop the server -echo ========================================== - -REM 运行服务 -main.exe \ No newline at end of file diff --git a/scripts/start.sh b/scripts/start.sh deleted file mode 100644 index 25e9d80..0000000 --- a/scripts/start.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# Epic Game Web Service 启动脚本 - -echo "==========================================" -echo "Epic Game Web Service" -echo "Starting with cron jobs enabled..." -echo "==========================================" - -# 检查Go环境 -if ! command -v go &> /dev/null; then - echo "Error: Go is not installed or not in PATH" - exit 1 -fi - -# 检查Go版本 -GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//') -echo "Go version: $GO_VERSION" - -# 设置环境变量 -export GO_ENV=production -export GF_GCFG_FILE=manifest/config/config.yaml - -# 清理旧的构建文件 -echo "Cleaning old build files..." -rm -f main.exe -rm -f main - -# 构建项目 -echo "Building project..." -go build -o main.exe . - -if [ $? -ne 0 ]; then - echo "Error: Build failed" - exit 1 -fi - -echo "Build successful!" - -# 启动服务 -echo "Starting server on port 8283..." -echo "Cron jobs will be started automatically..." -echo "Press Ctrl+C to stop the server" -echo "==========================================" - -# 运行服务 -./main.exe \ No newline at end of file