BUILD_REV ?= $(shell git rev-parse --short HEAD)
BUILD_ARGS += --aot
BUILD_ARGS += --prod
OUTPUT_PATH = ../resources/public
all: install-deps build
gitrev:
echo "export const GITREV = \"$(BUILD_REV)\";" > src/environments/gitrev.ts
build: gitrev
@echo "Building EveBox webapp rev $(BUILD_REV)."
npm run ng -- build $(BUILD_ARGS) --output-path $(OUTPUT_PATH) --deploy-url "public/"
./node_modules/_done: package.json
npm ci --prefer-offline
touch $@
install-deps: ./node_modules/_done
clean:
rm -rf node_modules
rm -rf typings