-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
72 lines (56 loc) · 1.93 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
# keep in sync with: /~https://github.com/kitconcept/buildout/edit/master/Makefile
# update by running 'make update'
SHELL := /bin/bash
CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
# We like colors
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
RED=`tput setaf 1`
GREEN=`tput setaf 2`
RESET=`tput sgr0`
YELLOW=`tput setaf 3`
all: build-plone-6.0
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
.PHONY: help
help: ## This help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: clean
clean: ## Remove old virtualenv and creates a new one
@echo "$(RED)==> Cleaning environment and build$(RESET)"
rm -rf bin include lib lib64
bin/python bin/pip:
python3 -m venv .
bin/pip install --upgrade pip
.PHONY: build-plone-5.2
build-plone-5.2: bin/pip ## Build Plone 5.2
bin/pip install Plone Paste -c https://dist.plone.org/release/5.2.7/constraints.txt
bin/pip install -e ".[test]"
.PHONY: build-plone-6
build-plone-6.0: bin/pip ## Build Plone 6
bin/pip install Plone -c https://dist.plone.org/release/6.0.9/constraints.txt
bin/pip install -e ".[test]"
bin/mkwsgiinstance: build-plone-6
bin/mkwsgiinstance -d .
.PHONY: instance
instance etc/zope.ini: bin/mkwsgiinstance ## Create instance
bin/mkwsgiinstance -d . -u admin:admin
.PHONY: start
start: instance ## Start instance
bin/runwsgi -v etc/zope.ini
.PHONY: test
test: bin/zope-testrunner ## Run tests
bin/zope-testrunner --auto-color --auto-progress --test-path src
.PHONY: black
black: ## Black
bin/black src/ setup.py
.PHONY: isort
isort: ## iSort
bin/isort src/ setup.py
.PHONY: format
format: black isort ## Format codebase
.PHONY: Test Release
test-release: ## Run Pyroma and Check Manifest
bin/pyroma -n 10 -d .
.PHONY: Release
release: ## Release
bin/fullrelease