From 8bb6fdc03d182b771c5c8bb6215c0c668b6b06fc Mon Sep 17 00:00:00 2001 From: partisan Date: Fri, 27 Dec 2024 08:08:07 +0100 Subject: [PATCH] Revert "updated 'run.sh' and 'run.bat' so the process name is 'qgato'" This reverts commit 5b90a372a1e7ac86c37704049d5202fae15a3bda. --- run.bat | 14 ++------------ run.sh | 13 ++----------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/run.bat b/run.bat index eb3919d..26b37f6 100755 --- a/run.bat +++ b/run.bat @@ -60,25 +60,15 @@ if "%BUILD_MODE%"=="true" ( ) echo Build successful! Output: %CD%\%BUILD_OUTPUT% ) else ( - rem Check if the executable exists - if not exist "%BUILD_OUTPUT%" ( - echo Executable not found. Building it first... - go build -o "%BUILD_OUTPUT%" !GO_FILES! - if errorlevel 1 ( - echo Build failed! Unable to run the application. - exit /b 1 - ) - ) - rem Construct the command - set CMD="%BUILD_OUTPUT% !SKIP_CONFIG!" + set CMD=go run !GO_FILES! !SKIP_CONFIG! if not "%PORT%"=="" set CMD=!CMD! --port %PORT% if not "%DOMAIN%"=="" set CMD=!CMD! --domain %DOMAIN% rem Informative output echo Starting application with command: !CMD! - rem Run the application + rem Run the Go program with the constructed command call !CMD! ) diff --git a/run.sh b/run.sh index 2aeefad..c5fd207 100755 --- a/run.sh +++ b/run.sh @@ -51,21 +51,12 @@ if $BUILD_MODE; then fi else # Run mode - CMD="./$BUILD_OUTPUT $SKIP_CONFIG" + CMD="go run $GO_FILES $SKIP_CONFIG" [ -n "$PORT" ] && CMD="$CMD --port $PORT" [ -n "$DOMAIN" ] && CMD="$CMD --domain $DOMAIN" - if [ ! -f "$SCRIPT_DIR/$BUILD_OUTPUT" ]; then - echo "Executable not found. Building it first..." - go build -o "$SCRIPT_DIR/$BUILD_OUTPUT" $GO_FILES - if [ $? -ne 0 ]; then - echo "Build failed! Unable to run the application." - exit 1 - fi - fi - echo "Starting application with command: $CMD" - # Run the executable + # Run the Go program with the constructed command eval $CMD fi