Skip to content

Commit 27f6574

Browse files
committed
Merge pull request #2524 from fjl/windows-ci-scripts
build: add CI scripts for windows
2 parents 756b629 + c89f435 commit 27f6574

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

build/win-ci-compile.bat

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@echo off
2+
if not exist .\build\win-ci-compile.bat (
3+
echo This script must be run from the root of the repository.
4+
exit /b
5+
)
6+
if not defined GOPATH (
7+
echo GOPATH is not set.
8+
exit /b
9+
)
10+
11+
set GOPATH=%GOPATH%;%cd%\Godeps\_workspace
12+
set GOBIN=%cd%\build\bin
13+
14+
rem set gitCommit when running from a Git checkout.
15+
set goLinkFlags=""
16+
if exist ".git\HEAD" (
17+
where /q git
18+
if not errorlevel 1 (
19+
for /f %%h in ('git rev-parse HEAD') do (
20+
set goLinkFlags="-X main.gitCommit=%%h"
21+
)
22+
)
23+
)
24+
25+
@echo on
26+
go install -v -ldflags %goLinkFlags% ./...

build/win-ci-test.bat

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@echo off
2+
if not exist .\build\win-ci-test.bat (
3+
echo This script must be run from the root of the repository.
4+
exit /b
5+
)
6+
if not defined GOPATH (
7+
echo GOPATH is not set.
8+
exit /b
9+
)
10+
11+
set GOPATH=%GOPATH%;%cd%\Godeps\_workspace
12+
set GOBIN=%cd%\build\bin
13+
14+
@echo on
15+
go test ./...

0 commit comments

Comments
 (0)