dndmusicbot/Makefile

27 lines
706 B
Makefile
Raw Normal View History

APPLICATION_NAME ?= dndmusicbot
CURRENT_UID := $(shell id -u)
2022-11-21 07:30:02 +00:00
BIN := src/node_modules/.bin
default: build
2022-11-21 07:30:02 +00:00
PHONY: js image build
2022-11-21 07:30:02 +00:00
js: src/public/script.js
2022-11-21 07:30:02 +00:00
image: .jsimage
.jsimage: Dockerfile
@docker build -t dndmusicbot-js-build .
@touch .jsimage
src/yarn.lock: src/node_modules src/package.json
@docker run --rm --user $(CURRENT_UID) -v $(CURDIR)/src:/app dndmusicbot-js-build install --production=false --check-files
@touch -mr $(shell ls -Atd $? | head -1) $@
src/public/script.js: src/script.js src/yarn.lock
@docker run --user $(CURRENT_UID) -v $(CURDIR)/src:/app dndmusicbot-js-build build
$(APPLICATION_NAME): *.go ffmpeg/*.go speaker/*.go
@go build
build: image js $(APPLICATION_NAME)