-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (35 loc) · 1.06 KB
/
Makefile
File metadata and controls
49 lines (35 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.DEFAULT_GOAL := help
RELEASE_TAG:=$(shell date -u +%Y%m%dT%H%M%SZ)
.PHONY: help
help: ## show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
clean:
@rm -rf .next
@rm -rf out
clean-hard: clean
@rm -rf node_modules
install: ## install dependencies
@ni
run-dev: ## run as dev
@RELEASE_TAG=$(RELEASE_TAG) NEXT_PUBLIC_RELEASE_TAG=$(RELEASE_TAG) \
nr --silent dev
lint: ## lint
@nr --silent lint --fix
build-only: lint
@nr --silent build
build: clean build-only ## build
build-prod: clean
@RELEASE_TAG=$(RELEASE_TAG) \
NEXT_PUBLIC_RELEASE_TAG=$(RELEASE_TAG) \
GRAPHQL_SERVER=http://localhost:8889/ \
NODE_ENV=production nr --silent export
@touch out/.nojekyll
@cd ../page-react-deploy; make clean
@cp -R out/* ../page-react-deploy
release: build-prod ## perform release action
@cd ../page-react-deploy; make deploy
@echo "Version $(RELEASE_TAG) released"
test: ## Run tests
@nr --silent test
coverage: ## Test coverage report
@nr --silent coverage