-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
149 lines (122 loc) · 4.36 KB
/
Makefile
File metadata and controls
149 lines (122 loc) · 4.36 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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
##############################################################################
# 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 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
@echo "$(MARK_COLOR)Applying workspace protocol for development...$(NO_COLOR)"
node scripts/apply-workspace-protocol.js
NODE_OPTIONS="--max-old-space-size=16384" yarn install
node scripts/restore-production-package.js
.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_API_PATH=https://staging.eea.europa.eu RAZZLE_INTERNAL_API_PATH=https://staging.eea.europa.eu yarn start
.PHONY: demo
demo: ## Start frontend w/ Demo WWW Plone Backend
NODE_OPTIONS="--max-old-space-size=16384" RAZZLE_API_PATH=https://demo-www.eea.europa.eu RAZZLE_INTERNAL_API_PATH=https://demo-www.eea.europa.eu 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
python3 ./scripts/release.py -s chore -s sonar -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: cypress
cypress: ## Run Cypress acceptance tests (uses baseUrl from cypress.config.js)
yarn cypress:run
.PHONY: cypress-open
cypress-open: ## Open Cypress interactive test runner
yarn cypress:open
.PHONY: cypress-staging
cypress-staging: ## Run Cypress tests against staging
CYPRESS_BASE_URL=https://staging.eea.europa.eu/en yarn cypress:run
.PHONY: cypress-production
cypress-production: ## Run Cypress tests against production
CYPRESS_BASE_URL=https://www.eea.europa.eu/en yarn cypress:run
.PHONY: cypress-local
cypress-local: ## Run Cypress tests against localhost:3000
CYPRESS_BASE_URL=http://localhost:3000 yarn cypress:run
.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