Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Nephin <dnephin@gmail.com>
  • Loading branch information
g-gaston and dnephin committed Jan 18, 2022
1 parent 8755c22 commit 8074592
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/running-without-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@
`gotestsum` may be run without Go as long as the package to be tested has
already been compiled using `go test -c`, and the `test2json` tool is available.

The `test2json` tool can be compiled without installing go:
The `test2json` tool can be compiled from the Go source tree so that it can be distributed to the environment that needs it.

```sh
GOVERSION=1.13.5
GOVERSION=1.17.6
OS=$(uname -s | sed 's/.*/\L&/')
mkdir -p gopath
GOPATH=$(realpath gopath)
HOME=$(realpath ./)
curl -L --silent https://go.dev/dl/go${GOVERSION}.${OS}-amd64.tar.gz | tar xz -C ./
env HOME=$HOME GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GOPATH=$GOPATH ./go/bin/go build -o test2json -ldflags="-s -w" cmd/test2json
rm -rf go
rm -rf gopath
mv test2json /usr/local/bin/test2json
```

Expand Down

0 comments on commit 8074592

Please sign in to comment.