1
0
Fork 0
upl/Makefile

34 lines
450 B
Makefile
Raw Permalink Normal View History

2021-05-24 00:25:48 +08:00
GO = go
NPM = npm
.PHONY: all
2021-05-24 01:12:47 +08:00
all: build
2021-05-24 00:25:48 +08:00
.PHONY: clean
clean:
$(RM) -r upl web/assets
.PHONY: build
build: upl
2021-05-24 01:12:47 +08:00
upl: *.go web/*.tmpl web
2021-05-24 00:25:48 +08:00
$(GO) build -ldflags="-s -w" -tags "$(TAGS)" -v -o upl
.PHONY: test
2021-05-24 01:12:47 +08:00
test: web
2021-05-24 00:25:48 +08:00
$(GO) test -cover -bench=. -v ./...
2021-05-24 01:20:49 +08:00
.PHONY: vet
vet: web
$(GO) vet ./...
2021-05-24 00:25:48 +08:00
.PHONY: web
web: web/assets/bundle.js
web/node_modules:
cd web && $(NPM) install
web/assets/bundle.js: web/node_modules
cd web && $(NPM) run build