Skip to content

Commit

Permalink
allow yarn bin to be overridden
Browse files Browse the repository at this point in the history
Users might want to override the yarn command to add options
or use a different bin on systems like debian where yarn is
named yarnpkg.
  • Loading branch information
kmohrf committed Jun 26, 2021
1 parent 5988ea3 commit 07478a5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ LAST_COMMIT := $(shell git rev-parse --short HEAD)
VERSION := $(shell git describe --tags --abbrev=0)
BUILDSTR := ${VERSION} (\#${LAST_COMMIT} $(shell date -u +"%Y-%m-%dT%H:%M:%S%z"))

YARN ?= yarn

BIN := listmonk
STATIC := config.toml.sample \
schema.sql queries.sql \
Expand All @@ -15,7 +17,7 @@ STATIC := config.toml.sample \
.PHONY: deps
deps:
go get -u github.com/knadh/stuffbin/...
cd frontend && yarn install
cd frontend && $(YARN) install

# Build the backend to ./listmonk.
.PHONY: build
Expand All @@ -30,12 +32,12 @@ run: build
# Build the JS frontend into frontend/dist.
.PHONY: build-frontend
build-frontend:
export VUE_APP_VERSION="${VERSION}" && cd frontend && yarn build
export VUE_APP_VERSION="${VERSION}" && cd frontend && $(YARN) build

# Run the JS frontend server in dev mode.
.PHONY: run-frontend
run-frontend:
export VUE_APP_VERSION="${VERSION}" && cd frontend && yarn serve
export VUE_APP_VERSION="${VERSION}" && cd frontend && $(YARN) serve

# Run Go tests.
.PHONY: test
Expand Down

0 comments on commit 07478a5

Please sign in to comment.