open-consul/build.bat

18 lines
457 B
Batchfile
Raw Normal View History

2014-10-16 16:48:47 +00:00
@echo off
REM Download Mingw 64 on Windows from http://win-builds.org/download.html
set GOARCH=%2
IF "%2" == "" (set GOARCH=amd64)
set MODULENAME=%1
2014-10-16 16:48:47 +00:00
set ORG_PATH=github.com\hashicorp
set REPO_PATH=%ORG_PATH%\%MODULENAME%
2014-10-16 16:48:47 +00:00
set GOPATH=%cd%\gopath
rmdir /s /q %GOPATH%\src\%REPO_PATH% 2>nul
mkdir %GOPATH%\src\%ORG_PATH% 2>nul
go get .\...
2014-10-16 16:48:47 +00:00
mklink /J "%GOPATH%\src\%REPO_PATH%" "%cd%" 2>nul
%GOROOT%\bin\go build -o bin\%GOARCH%\%MODULENAME%.exe %REPO_PATH%