-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (34 loc) · 1.41 KB
/
Makefile
File metadata and controls
42 lines (34 loc) · 1.41 KB
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
33
34
35
36
37
38
39
40
41
42
include .envrc
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
help:
@echo 'Usage:'
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
# ==================================================================================== #
# DEVELOPMENT
# ==================================================================================== #
## dev/debug: build with specific flags that allows delve debugging on remote port (GOLAND specific)
.PHONY: dev/debug
dev/debug:
CGO_ENABLED=1; \
go build -gcflags "all=-N -l" -o ./bin .; \
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./bin/letshare.exe
# ==================================================================================== #
# BUILD
# ==================================================================================== #
## build/app: build the application binary
.PHONY: build/app
build/app:
CGO_ENABLED=0; \
go build -ldflags="-s -w -X main.version=${VERSION}" .
## goreleaser/snapshot: build the goreleaser test dist
.PHONY: goreleaser/snapshot
goreleaser/snapshot:
goreleaser release --snapshot --clean --skip=publish
## goreleaser/release: release it to the world
.PHONY: goreleaser/release
goreleaser/release:
goreleaser release --clean