1
0
Fork 0
upl/Makefile

31 lines
408 B
Makefile
Raw Normal View History

2021-05-24 00:25:48 +08:00
GO = go
NPM = npm
.PHONY: all
all: web build
.PHONY: clean
clean:
$(RM) -r upl web/assets
.PHONY: build
build: upl
upl: *.go web/*.tmpl
$(GO) build -ldflags="-s -w" -tags "$(TAGS)" -v -o upl
.PHONY: test
test:
2021-05-24 00:25:48 +08:00
$(GO) test -cover -bench=. -v ./...
.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