aboutsummaryrefslogtreecommitdiffstats
path: root/build/win-ci-compile.bat
blob: 5750990bf0bff67fa194e799ea40d5b03c5e5aec (plain) (blame)
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
@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% ./...