Skip to content

Commit

Permalink
build: add CI scripts for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed May 7, 2016
1 parent f821b01 commit c89f435
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
26 changes: 26 additions & 0 deletions build/win-ci-compile.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@echo off
if not exist .\build\win-ci-compile.bat (
echo This script must be run from the root of the repository.
exit /b
)
if not defined GOPATH (
echo GOPATH is not set.
exit /b
)

set GOPATH=%GOPATH%;%cd%\Godeps\_workspace
set GOBIN=%cd%\build\bin

rem set gitCommit when running from a Git checkout.
set goLinkFlags=""
if exist ".git\HEAD" (
where /q git
if not errorlevel 1 (
for /f %%h in ('git rev-parse HEAD') do (
set goLinkFlags="-X main.gitCommit=%%h"
)
)
)

@echo on
go install -v -ldflags %goLinkFlags% ./...
15 changes: 15 additions & 0 deletions build/win-ci-test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@echo off
if not exist .\build\win-ci-test.bat (
echo This script must be run from the root of the repository.
exit /b
)
if not defined GOPATH (
echo GOPATH is not set.
exit /b
)

set GOPATH=%GOPATH%;%cd%\Godeps\_workspace
set GOBIN=%cd%\build\bin

@echo on
go test ./...

0 comments on commit c89f435

Please sign in to comment.