-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (25 loc) · 682 Bytes
/
Makefile
File metadata and controls
33 lines (25 loc) · 682 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
33
.PHONY: build build-linux run test clean install deps
VERSION ?= dev
LDFLAGS := -ldflags "-X main.version=$(VERSION)"
# Build the binary
build:
go build $(LDFLAGS) -o deploydeck ./cmd/deploydeck
# Build for Linux (useful for deployment from macOS)
build-linux:
GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o deploydeck-linux-amd64 ./cmd/deploydeck
# Run the application
run:
go run ./cmd/deploydeck --config config.yaml
# Run tests
test:
go test -v ./...
# Clean build artifacts
clean:
rm -f deploydeck deploydeck-linux-amd64
# Install dependencies
deps:
go mod download
go mod tidy
# Install the binary to GOPATH/bin
install:
go install $(LDFLAGS) ./cmd/deploydeck