-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.bat
30 lines (25 loc) · 894 Bytes
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@echo off
set OUTPUT_FOLDER=bin
set BINARY_NAME=KC-Checker
set VERSION=1.0.4
set DESCRIPTION=Open source proxy checker built in Go, fast and beautiful. Created by Kuchen (Kuucheen on GitHub).
echo Compiling for Windows...
set GOOS=windows
set GOARCH=amd64
go build -ldflags="-X 'main.Version=%VERSION%' -X 'main.Description=%DESCRIPTION%'" -o %OUTPUT_FOLDER%\%BINARY_NAME%.exe
if %ERRORLEVEL% neq 0 (
echo Compilation failed for Windows
exit /b %ERRORLEVEL%
)
echo Compilation for Windows successful
echo Compiling for Linux...
set GOOS=linux
set GOARCH=amd64
go build -ldflags="-X 'main.Version=%VERSION%' -X 'main.Description=%DESCRIPTION%'" -o %OUTPUT_FOLDER%\%BINARY_NAME%
if %ERRORLEVEL% neq 0 (
echo Compilation failed for Linux
exit /b %ERRORLEVEL%
)
echo Compilation for Linux successful
echo Compilation completed successfully for both Windows and Linux
exit /b 0