From b2b8e3082d26c064e6761067db3f0f2fb3875bee Mon Sep 17 00:00:00 2001 From: makeworld Date: Sat, 12 Sep 2020 19:35:12 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Stop=20using=20go=20env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit go env changes env vars globally for users, altering their existing setups --- Makefile | 2 +- README.md | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3adaf4c..b9a1a5b 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ INSTALL := install RM := rm amfora: go.mod go.sum $(SRC) - go env -w GO111MODULE=on CGO_ENABLED=0 ; $(GO) build -o $@ -ldflags="-s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.builtBy=$(BUILDER)" + GO111MODULE=on CGO_ENABLED=0 $(GO) build -o $@ -ldflags="-s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.builtBy=$(BUILDER)" .PHONY: clean clean: diff --git a/README.md b/README.md index 9dbd275..b68da3f 100644 --- a/README.md +++ b/README.md @@ -62,14 +62,16 @@ brew upgrade amfora ### From Source This section is for programmers who want to install from source. Make sure you're using Go 1.13 at least, as earlier versions will fail to build. -The recommended way of installing Amfora fom source is using the Makefile. On Windows, you need install make, which can be done with [Chocolatey](https://chocolatey.org/install): `choco install make`. +The recommended way of installing Amfora fom source is using the Makefile. + +On Windows, you need install make, which can be done with [Chocolatey](https://chocolatey.org/install): `choco install make`. Please note the Makefile does not intend to support Windows, and so there may be issues. ```shell git clone https://github.com/makeworld-the-better-one/amfora cd amfora # git checkout v1.2.3 # Optionally pin to a specific version instead of the latest commit make -sudo make install # Not for Windows! +sudo make install # If you want to install the binary for all users ``` Because you installed with the Makefile, running `amfora -v` will tell you exactly what commit the binary was built from.