forked from minepkg/minepkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 742 Bytes
/
Makefile
File metadata and controls
33 lines (24 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.PHONY: build run test
build:
go build -ldflags="-s -w" -o ./out/minepkg
test:
go test -v ./...
build-win:
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o ./out/minepkg.exe
build-linux:
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ./out/minepkg-linux
run-docker:
docker run --rm -it \
-v ${PWD}/out/minepkg-linux:/usr/bin/minepkg \
-v ${PWD}/.tmp/docker-configs:/root/.minepkg \
golang:latest bash
MOD=github.com/minepkg/minepkg
godoc:
docker run \
--rm \
-e "GOPATH=/tmp/go" \
-p 127.0.0.1:6060:6060 \
-v ${PWD}:/tmp/go/src/${MOD} \
golang \
bash -c "go get golang.org/x/tools/cmd/godoc && echo http://localhost:6060/pkg/${MOD} && /tmp/go/bin/godoc -http=:6060"
docker: build-linux run-docker