-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
56 lines (46 loc) · 1.1 KB
/
Makefile
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
53
54
55
56
PACKAGE_NAME := github.com/deref/exo
GOLANG_CROSS_VERSION ?= v1.17.2
.PHONY: all
all:
$(MAKE) codegen
$(MAKE) build
.PHONY: build
build: bin/exo
$(MAKE) -C gui build
.PHONY:
bin/exo:
go build -o ./bin/exo
.PHONY: codegen
codegen:
./script/codegen.sh
.PHONY: make-gui
make-gui:
make -C gui
.PHONY: mod-tidy
mod-tidy:
go mod tidy
.PHONY: completions
completions:
./script/completions.sh
.PHONY: run-tests
run-tests: bin/exo
go run ./test ./bin/exo ./test/image/fixtures
.PHONY: release-dry-run
release-dry-run: make-gui mod-tidy codegen completions
@docker run \
--privileged \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/troian/golang-cross:${GOLANG_CROSS_VERSION} \
--rm-dist --skip-validate --skip-publish
.PHONY: release
release: make-gui mod-tidy codegen completions
@docker run \
--privileged \
-e GITHUB_TOKEN \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/troian/golang-cross:${GOLANG_CROSS_VERSION} \
--rm-dist