1
0
mirror of https://github.com/makew0rld/amfora.git synced 2024-11-03 02:37:23 -05:00

🔨 Stop using go env

go env changes env vars globally for users, altering their existing setups
This commit is contained in:
makeworld 2020-09-12 19:35:12 -04:00
parent 32e3015b27
commit b2b8e3082d
2 changed files with 5 additions and 3 deletions

View File

@ -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:

View File

@ -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.