-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (27 loc) · 1.19 KB
/
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
SHELL := /bin/bash
GOCMD = go
install:
go mod download
tidy:
go mod tidy
run:
go run main.go $(ARGS)
test:
go test -v --cover ./...
build-linux:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build $(ARGS)
build-mac:
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build $(ARGS)
build-all:
GOOS=linux GOARCH=amd64 go build $(ARGS) -o bin/create_steplets-Linux-x86_64
GOOS=linux GOARCH=arm64 go build $(ARGS) -o bin/create_steplets-Linux-ARM64
GOOS=darwin GOARCH=amd64 go build $(ARGS) -o bin/create_steplets-Darwin-x86_64
GOOS=darwin GOARCH=arm64 go build $(ARGS) -o bin/create_steplets-Darwin-ARM64
GOOS=windows GOARCH=amd64 go build $(ARGS) -o bin/create_steplets-Windows-x86_64
build-all-ci:
GOOS=linux GOARCH=amd64 go build $(ARGS) -o bin/create_steplets-Linux-x86_64 -ldflags "-s -w"
GOOS=linux GOARCH=arm64 go build $(ARGS) -o bin/create_steplets-Linux-ARM64 -ldflags "-s -w"
GOOS=darwin GOARCH=amd64 go build $(ARGS) -o bin/create_steplets-Darwin-x86_64 -ldflags "-s -w"
GOOS=darwin GOARCH=arm64 go build $(ARGS) -o bin/create_steplets-Darwin-ARM64 -ldflags "-s -w"
GOOS=windows GOARCH=amd64 go build $(ARGS) -o bin/create_steplets-Windows-x86_64 -ldflags "-s -w"
do-all: install tidy test build-all-ci