-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
121 lines (100 loc) · 3.23 KB
/
Makefile
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
##############################################################################
# Run:
# make
# make start
#
# Go to:
#
# http://localhost:3000
#
# Test add-ons:
#
# make test src/addons/volto-accordion-block
#
##############################################################################
# SETUP MAKE
#
## Defensive settings for make: https://tech.davis-hansson.com/p/make/
SHELL:=bash
.ONESHELL:
# for Makefile debugging purposes add -x to the .SHELLFLAGS
.SHELLFLAGS:=-eu -o pipefail -O inherit_errexit -c
.SILENT:
.DELETE_ON_ERROR:
MAKEFLAGS+=--warn-undefined-variables
MAKEFLAGS+=--no-builtin-rules
# Colors
# OK=Green, warn=yellow, error=red
ifeq ($(TERM),)
# no colors if not in terminal
MARK_COLOR=
OK_COLOR=
WARN_COLOR=
ERROR_COLOR=
NO_COLOR=
else
MARK_COLOR=`tput setaf 6`
OK_COLOR=`tput setaf 2`
WARN_COLOR=`tput setaf 3`
ERROR_COLOR=`tput setaf 1`
NO_COLOR=`tput sgr0`
endif
##############################################################################
# Top-level targets
.PHONY: all
all: develop install husky
.PHONY: develop
develop: ## Runs missdev in the local project (mrs.developer.json should be present)
npx -p mrs-developer missdev --config=jsconfig.json --output=addons --fetch-https
.PHONY: install
install: ## Install project and add-ons
NODE_OPTIONS="--max-old-space-size=16384" yarn install
.PHONY: build
build: ## Build frontend
NODE_OPTIONS="--max-old-space-size=16384" yarn build
.PHONY: bundlewatch
bundlewatch:
yarn bundlewatch --config .bundlewatch.config.json
.PHONY: husky
husky: ## Install husky git hooks in src/addons/*
./scripts/husky.sh
.PHONY: start
start: ## Start frontend
NODE_OPTIONS="--max-old-space-size=16384" yarn start
.PHONY: relstorage
relstorage: ## Start frontend w/ RelStorage Plone Backend
NODE_OPTIONS="--max-old-space-size=16384" RAZZLE_DEV_PROXY_API_PATH=http://localhost:8080/www yarn start
.PHONY: staging
staging: ## Start frontend w/ Staging Plone Backend
NODE_OPTIONS="--max-old-space-size=16384" RAZZLE_DEV_PROXY_API_PATH=http://10.110.30.173:59707/www yarn start
.PHONY: omelette
omelette: ## Creates the omelette folder that contains a link to the installed version of Volto (a softlink pointing to node_modules/@plone/volto)
if [ ! -d omelette ]; then ln -sf node_modules/@plone/volto omelette; fi
.PHONY: patches
patches:
/bin/bash patches/patchit.sh > /dev/null 2>&1 ||true
.PHONY: release
release: ## Show release candidates
./scripts/release.py -v
.PHONY: update
update: ## git pull all src/addons
./scripts/update.sh
.PHONY: issues
issues: ## Check github for open pull-requests
./scripts/pull-requests.py WARN
.PHONY: issues-all
issues-all: ## Check github for open pull-requests
./scripts/pull-requests-volto.py WARN
.PHONY: status
status: ## Check src/addons for changes
./scripts/status.sh
.PHONY: pull
pull: ## Run git pull on all src/addons
./scripts/pull.sh
.PHONY: test
test: ## Run Jest tests for Volto add-on
RAZZLE_JEST_CONFIG=$(filter-out $@,$(MAKECMDGOALS))/jest-addon.config.js yarn test $(filter-out $@,$(MAKECMDGOALS))
.PHONY: help
help: ## Show this help.
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
head -n 14 Makefile