-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
18 lines (15 loc) · 731 Bytes
/
Copy pathMakefile
File metadata and controls
18 lines (15 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
GO_CACHE_DIR := $(CURDIR)/.cache/go-build
GO_MOD_CACHE_DIR := $(CURDIR)/.cache/go-mod
GO_PATH_DIR := $(CURDIR)/.cache/go
.PHONY: run
run:
mkdir -p "$(GO_CACHE_DIR)" "$(GO_MOD_CACHE_DIR)" "$(GO_PATH_DIR)"
GOCACHE="$(GO_CACHE_DIR)" GOMODCACHE="$(GO_MOD_CACHE_DIR)" GOPATH="$(GO_PATH_DIR)" go run ./cmd/codewithphone start
.PHONY: build
build:
mkdir -p "$(GO_CACHE_DIR)" "$(GO_MOD_CACHE_DIR)" "$(GO_PATH_DIR)"
GOCACHE="$(GO_CACHE_DIR)" GOMODCACHE="$(GO_MOD_CACHE_DIR)" GOPATH="$(GO_PATH_DIR)" go build -o bin/codewithphone ./cmd/codewithphone
.PHONY: test
test:
mkdir -p "$(GO_CACHE_DIR)" "$(GO_MOD_CACHE_DIR)" "$(GO_PATH_DIR)"
GOCACHE="$(GO_CACHE_DIR)" GOMODCACHE="$(GO_MOD_CACHE_DIR)" GOPATH="$(GO_PATH_DIR)" go test ./...