Create build.bat

This commit is contained in:
Nishchay 2014-10-16 09:48:47 -07:00
parent e94627be20
commit 9e2f6e59e1
1 changed files with 14 additions and 0 deletions

14
build.bat Normal file
View File

@ -0,0 +1,14 @@
@echo off
set GOARCH=%1
IF "%1" == "" (set GOARCH=amd64)
set ORG_PATH=github.com\hashicorp
set REPO_PATH=%ORG_PATH%\consul
set GOPATH=%cd%\gopath
rmdir /s /q %GOPATH%\src\%REPO_PATH% 2>nul
mkdir %GOPATH%\src\%ORG_PATH% 2>nul
mklink /J "%GOPATH%\src\%REPO_PATH%" "%cd%" 2>nul
%GOROOT%\bin\go build -o bin\%GOARCH%\consul.exe %REPO_PATH%