2014-10-16 16:48:47 +00:00
|
|
|
@echo off
|
|
|
|
|
2014-12-13 18:46:43 +00:00
|
|
|
REM Download Mingw 64 on Windows from http://win-builds.org/download.html
|
|
|
|
|
2014-12-13 20:11:41 +00:00
|
|
|
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
|
2014-12-13 20:11:41 +00:00
|
|
|
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
|
2014-12-13 20:11:41 +00:00
|
|
|
go get .\...
|
2014-10-16 16:48:47 +00:00
|
|
|
mklink /J "%GOPATH%\src\%REPO_PATH%" "%cd%" 2>nul
|
|
|
|
|
2014-12-13 20:11:41 +00:00
|
|
|
%GOROOT%\bin\go build -o bin\%GOARCH%\%MODULENAME%.exe %REPO_PATH%
|