-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (39 loc) · 1.3 KB
/
Makefile
File metadata and controls
52 lines (39 loc) · 1.3 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
43
44
45
46
47
48
49
50
51
52
#!make
ifneq (,$(wildcard .env))
include .env
endif
.PHONY: run
run:
go run -ldflags " \
-X github.com/forevanyeung/guppy/cli/analytics.PosthogEndpoint=$(POSTHOG_ENDPOINT) \
-X github.com/forevanyeung/guppy/cli/analytics.PosthogApiKey=$(POSTHOG_API_KEY)" \
./cli $(FILE) $(if $(VERBOSE),-v)
.PHONY: run-desktop
run-desktop:
go run -ldflags " \
-X github.com/forevanyeung/guppy/cli/analytics.PosthogEndpoint=$(POSTHOG_ENDPOINT) \
-X github.com/forevanyeung/guppy/cli/analytics.PosthogApiKey=$(POSTHOG_API_KEY)" \
./cli $(FILE) --desktop $(if $(VERBOSE),-v)
.PHONY: clean
clean:
rm -rf ./cli/dist
.PHONY: build
build: clean
go build -ldflags " \
-X github.com/forevanyeung/guppy/cli/analytics.PosthogEndpoint=$(POSTHOG_ENDPOINT) \
-X github.com/forevanyeung/guppy/cli/analytics.PosthogApiKey=$(POSTHOG_API_KEY) \
$(if $(VERSION),-X github.com/forevanyeung/guppy/cli/internal.Version=$(VERSION))" \
-o ./cli/dist/guppy ./cli
.PHONY: clean-macos
clean-macos:
rm -rf ./macos/build
.PHONY: build-macos
build-macos: clean-macos
xcodebuild archive \
-project ./macos/guppy.xcodeproj \
-scheme guppy \
-configuration Release \
-archivePath ./macos/build/guppy.xcarchive \
PRODUCT_NAME="guppy" \
$(if $(VERSION),MARKETING_VERSION="$(VERSION)") \
$(if $(BUILD),CURRENT_PROJECT_VERSION="$(BUILD)")