-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
25 lines (18 loc) · 873 Bytes
/
make.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
perl .\get-version.pl > version.txt
perl .\get-revision.pl > revision.txt
set /p version=<version.txt
set /p revision=<revision.txt
if "%1" == "install" (
go install -ldflags "-X github.com/marstr/baronial/cmd.revision=%revision% -X github.com/marstr/baronial/cmd.version=%version%"
exit
)
go test ./... || exit /b
go build -ldflags "-X github.com/marstr/baronial/cmd.revision=%revision% -X github.com/marstr/baronial/cmd.version=%version%" -o bin\windows\baronial.exe
setlocal
set GOOS=darwin
go build -ldflags "-X github.com/marstr/baronial/cmd.revision=%revision% -X github.com/marstr/baronial/cmd.version=%version%" -o bin\darwin\baronial
endlocal
setlocal
set GOOS=linux
go build -ldflags "-X github.com/marstr/baronial/cmd.revision=%revision% -X github.com/marstr/baronial/cmd.version=%version%" -o bin\linux\baronial
endlocal