From 9e2f6e59e1591274a24acd86df445d2df99988b5 Mon Sep 17 00:00:00 2001 From: Nishchay Date: Thu, 16 Oct 2014 09:48:47 -0700 Subject: [PATCH] Create build.bat --- build.bat | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 build.bat diff --git a/build.bat b/build.bat new file mode 100644 index 000000000..146b73b2f --- /dev/null +++ b/build.bat @@ -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%