-
Notifications
You must be signed in to change notification settings - Fork 4
/
makefile
39 lines (28 loc) · 852 Bytes
/
makefile
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
.PHONY: help build push tidy run bins windows linux darwin
help:
@echo "Makefile commands:"
@echo ""
@echo "run - Go Run main"
@echo "tidy - Go Mody Tidy"
@echo "windows - Build windows binary"
@echo "linux - Build linux binary"
@echo "darwin - Build mac binary"
@echo "bins - Make all the bins"
@echo "clean - Clean the build dir"
@echo ""
.DEFAULT_GOAL := build-docker
run:
@go run main.go
download:
@go mod download
tidy:
@go mod tidy
bins: download windows linux darwin
windows:
@env GOOS=windows GOARCH=amd64 go build -v -o bin/windows-helix -ldflags="-s -w" cmd/main.go
linux:
@env GOOS=linux GOARCH=amd64 go build -v -o bin/linux-helix -ldflags="-s -w" cmd/main.go
darwin:
@env GOOS=darwin GOARCH=amd64 go build -v -o bin/darwin-helix -ldflags="-s -w" cmd/main.go
clean:
@rm -rf bin/