mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 14:24:39 +00:00
Merge pull request #536 from awesomenix/master
Add Build.bat for building on Windows 32bit or 64bit
This commit is contained in:
commit
88c80a9137
18
build.bat
Normal file
18
build.bat
Normal file
@ -0,0 +1,18 @@
|
||||
@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
|
||||
set ORG_PATH=github.com\hashicorp
|
||||
set REPO_PATH=%ORG_PATH%\%MODULENAME%
|
||||
|
||||
set GOPATH=%cd%\gopath
|
||||
|
||||
rmdir /s /q %GOPATH%\src\%REPO_PATH% 2>nul
|
||||
mkdir %GOPATH%\src\%ORG_PATH% 2>nul
|
||||
go get .\...
|
||||
mklink /J "%GOPATH%\src\%REPO_PATH%" "%cd%" 2>nul
|
||||
|
||||
%GOROOT%\bin\go build -o bin\%GOARCH%\%MODULENAME%.exe %REPO_PATH%
|
Loading…
x
Reference in New Issue
Block a user