-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 746 Bytes
/
Makefile
File metadata and controls
42 lines (30 loc) · 746 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
34
35
36
37
38
39
40
41
42
# Makefile for lazycommit
BINARY=lazycommit
VERSION=0.1.0
# Build the application
build:
go build -o ${BINARY} main.go
# Install the application
install:
go install
# Run tests
test:
go test -v ./...
# Clean build artifacts
clean:
rm -f ${BINARY}
# Build for multiple platforms
build-all: build-linux build-mac build-windows
build-linux:
GOOS=linux GOARCH=amd64 go build -o ${BINARY}-linux-amd64 main.go
build-mac:
GOOS=darwin GOARCH=amd64 go build -o ${BINARY}-darwin-amd64 main.go
build-windows:
GOOS=windows GOARCH=amd64 go build -o ${BINARY}-windows-amd64.exe main.go
# Format source code
fmt:
go fmt ./...
# Run vet
vet:
go vet ./...
.PHONY: build install test clean build-all build-linux build-mac build-windows fmt vet