-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 898 Bytes
/
Copy pathMakefile
File metadata and controls
42 lines (30 loc) · 898 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
SHA = $(shell git rev-parse HEAD)
ASSETS := \
internal/ui/assets/edit/index.html \
internal/ui/assets/index.html
.PHONY: all clean develop nuke publish
all: bin/go
bin/go: cmd/go/main.go $(ASSETS) $(shell find internal -name '*.go')
go build -o $@ ./cmd/go
node_modules/.build: package.json
npm install
touch $@
internal/ui/assets/edit/index.html: node_modules/.build $(shell find ui -type f)
npm run build
internal/ui/assets/index.html: node_modules/.build $(shell find ui -type f)
npm run build
develop: bin/go
bin/go --addr=:4025 --metrics=true --dev-mode=.:4026
clean:
rm -rf bin internal/ui/assets
nuke: clean
rm -rf node_modules
bin/publish: cmd/publish/main.go
go build -o $@ ./cmd/publish
publish: bin/publish
bin/publish \
--tag=latest \
--tag=$(shell git rev-parse --short $(SHA)) \
--platform=linux/arm64 \
--platform=linux/amd64 \
--image=kellegous/go