-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (32 loc) · 1.52 KB
/
Makefile
File metadata and controls
42 lines (32 loc) · 1.52 KB
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
.PHONY: all test test-bdd build preseed clean alfredworkflow
BIN_DIR := bin
all: build
test:
go test ./...
test-bdd:
go test -tags=bdd -run TestBDD -timeout 60s
test-integration:
go test -tags=bdd -run "TestActualCachePreSeedingIntegration|TestPerformanceRegression" -timeout 120s
test-all: test test-bdd test-integration
build:
mkdir -p $(BIN_DIR)
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o $(BIN_DIR)/geotz_amd64 ./cmd/geotz
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -trimpath -o $(BIN_DIR)/geotz_arm64 ./cmd/geotz
lipo -create -output $(BIN_DIR)/geotz $(BIN_DIR)/geotz_amd64 $(BIN_DIR)/geotz_arm64
rm $(BIN_DIR)/geotz_amd64 $(BIN_DIR)/geotz_arm64
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o $(BIN_DIR)/timein_amd64 ./cmd/timein
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -trimpath -o $(BIN_DIR)/timein_arm64 ./cmd/timein
lipo -create -output $(BIN_DIR)/timein $(BIN_DIR)/timein_amd64 $(BIN_DIR)/timein_arm64
rm $(BIN_DIR)/timein_amd64 $(BIN_DIR)/timein_arm64
preseed:
go build -o .preseed ./cmd/preseed
./.preseed
rm .preseed
alfredworkflow: build preseed
rm -f TimeIn.alfredworkflow
cp $(BIN_DIR)/geotz $(BIN_DIR)/timein workflow/
cp info.plist icon.png geotz_cache.json workflow/
cd workflow && zip -r ../TimeIn.alfredworkflow geotz timein info.plist icon.png geotz_cache.json screenshot.png
rm workflow/geotz workflow/timein workflow/info.plist workflow/icon.png workflow/geotz_cache.json
clean:
rm -rf $(BIN_DIR)/*.alfredworkflow $(BIN_DIR)/geotz $(BIN_DIR)/timein