From 8e817ab2a50ced5dae40a9529b9dc5bb095e1ea0 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Fri, 9 Jun 2017 01:11:38 -0700 Subject: [PATCH] Removes obsolete Windows batch file and instructions. We officially just cross-compile to Windows, and soon will have the normal Go build working. Since we no longer have any cgo dependencies, none of this complexity is really needed. --- README.md | 21 +------------- make.bat | 82 ------------------------------------------------------- 2 files changed, 1 insertion(+), 102 deletions(-) delete mode 100644 make.bat diff --git a/README.md b/README.md index 09a5e67f4..177d3ac4a 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ $ bin/consul ... ``` -*Note: `make` will build all os/architecture combinations. Set the environment variable CONSUL_DEV=1 to build it just for your local machine's os/architecture.* +*Note: `make` will build all os/architecture combinations. Set the environment variable `CONSUL_DEV=1` to build it just for your local machine's os/architecture, or use `make dev`.* *Note: `make` will also place a copy of the binary in the first part of your `$GOPATH`.* @@ -64,25 +64,6 @@ You can run tests by typing `make test`. If you make any changes to the code, run `make format` in order to automatically format the code according to Go standards. -### Building Consul on Windows - -Make sure Go 1.8+ is installed on your system and that the Go command is in your -%PATH%. - -For building Consul on Windows, you also need to have MinGW installed. -[TDM-GCC](http://tdm-gcc.tdragon.net/) is a simple bundle installer which has all -the required tools for building Consul with MinGW. - -Install TDM-GCC and make sure it has been added to your %PATH%. - -If all goes well, you should be able to build Consul by running `make.bat` from a -command prompt. - -See also [golang/winstrap](https://github.com/golang/winstrap) and -[golang/wiki/WindowsBuild](https://github.com/golang/go/wiki/WindowsBuild) -for more information of how to set up a general Go build environment on Windows -with MinGW. - ## Vendoring Consul currently uses [govendor](https://github.com/kardianos/govendor) for diff --git a/make.bat b/make.bat deleted file mode 100644 index a1360b025..000000000 --- a/make.bat +++ /dev/null @@ -1,82 +0,0 @@ -@echo off - -setlocal - -set _EXITCODE=0 - -set _DEPSFILE=%TEMP%\consul-deps.txt -go list -f "{{range .TestImports}}{{.}} {{end}}" .\... >%_DEPSFILE% - -set _PKGSFILE=%TEMP%\consul-pkgs.txt -go list .\... >%_PKGSFILE% - -set _VETARGS=-asmdecl -atomic -bool -buildtags -copylocks -methods^ - -nilfunc -printf -rangeloops -shift -structtags -unsafeptr -if defined VETARGS set _VETARGS=%VETARGS% - -:deps -echo --^> Installing build dependencies -for /f "delims=" %%d in (%_DEPSFILE%) do go get -d -v .\... %%d - -if [%1]==[] goto all -if x%1==xdeps goto end -goto args - -:args -for %%a in (all,cover,test,vet,updatedeps) do (if x%1==x%%a goto %%a) -echo. -echo Unknown make target: %1 -echo Expected one of "all", "cover", "deps", "test", "vet", or "updatedeps". -set _EXITCODE=1 -goto end - -:all -md bin 2>NUL -call .\scripts\windows\build.bat %CD% -if not errorlevel 1 goto end -echo. -echo BUILD FAILED -set _EXITCODE=%ERRORLEVEL% -goto end - -:cover -set _COVER=--cover -go tool cover 2>NUL -if %ERRORLEVEL% EQU 3 go get golang.org/x/tools/cmd/cover -goto test - -:test -call .\scripts\windows\verify_no_uuid.bat %CD% -if %ERRORLEVEL% EQU 0 goto _test -echo. -echo UUID verification failed. -set _EXITCODE=%ERRORLEVEL% -goto end -:_test -for /f "delims=" %%p in (%_PKGSFILE%) do ( - go test %_COVER% %%p - if errorlevel 1 set _TESTFAIL=1 -) -if x%_TESTFAIL%==x1 set _EXITCODE=1 && goto end -goto vet - -:vet -go tool vet 2>NUL -if %ERRORLEVEL% EQU 3 go get golang.org/x/tools/cmd/vet -echo --^> Running go tool vet %_VETARGS% -go tool vet %_VETARGS% . -echo. -if %ERRORLEVEL% EQU 0 echo ALL TESTS PASSED && goto end -echo Vet found suspicious constructs. Please check the reported constructs -echo and fix them if necessary before submitting the code for reviewal. -set _EXITCODE=%ERRORLEVEL% -goto end - -:updatedeps -echo --^> Updating build dependencies -for /f "delims=" %%d in (%_DEPSFILE%) do go get -d -f -u .\... %%d -goto end - -:end -del /F %_DEPSFILE% %_PKGSFILE% 2>NUL -exit /B %_EXITCODE%