Update Makefile

This commit is contained in:
Ken Hibino
2021-10-15 11:22:31 -07:00
parent 81ae7c2d4f
commit 41d42c6f73
2 changed files with 8 additions and 2 deletions

3
.gitignore vendored
View File

@@ -23,8 +23,9 @@ package-json.lock
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# main binary
# binaries
asynqmon
api
dist/
# Editor configs

View File

@@ -1,10 +1,15 @@
.PHONY: assets build docker
.PHONY: api assets build docker
NODE_PATH ?= $(PWD)/ui/node_modules
assets:
@if [ ! -d "$(NODE_PATH)" ]; then cd ./ui && yarn install --modules-folder $(NODE_PATH); fi
cd ./ui && yarn build --modules-folder $(NODE_PATH)
# This target skips the overhead of building UI assets.
# Intended to be used during development.
api:
go build -o api ./cmd/asynqmon
# Build a release binary.
build: assets
go build -o asynqmon ./cmd/asynqmon