-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (21 loc) · 711 Bytes
/
Makefile
File metadata and controls
22 lines (21 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Define variables
hash = $(shell git rev-parse --short HEAD)
DATE = $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
linux: clean
@echo "Building for linux"
GOOS=linux GOARCH=amd64 go build -o bin/dotmanager -ldflags '-X main.Commit=$(hash) -X main.Date=$(DATE)' .
windows: clean
@echo "Building for windows"
GOOS=windows GOARCH=amd64 go build -o bin/dotmanager -ldflags '-X main.Commit=$(hash) -X main.Date=$(DATE)' .
mac: clean
@echo "Building for mac"
GOOS=darwin GOARCH=amd64 go build -o bin/dotmanager -ldflags '-X main.Commit=$(hash) -X main.Date=$(DATE)' .
clean:
@echo "Cleaning up"
# Remove the bin directory
rm -rf bin
pr-approval:
@echo "Running PR CI"
go build ./...
go vet ./...
go test ./...