forked from plone/buildout.coredev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (45 loc) · 1.56 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
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
# 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: all
all: build code-analysis test test-acceptance
.PHONY: build
build: ## Create virtualenv and run buildout
@echo "$(GREEN)==> Setup Virtual Env$(RESET)"
virtualenv -p python2 --clear .
bin/pip install pip --upgrade
bin/pip install -r requirements.txt --upgrade
bin/buildout
.PHONY: build-py3
build-py3:
virtualenv --python=python3 .
bin/pip install --upgrade pip
bin/pip install -r requirements.txt
bin/buildout
.PHONY: clean
clean: ## Remove old virtualenv and creates a new one
@echo "Clean"
rm -rf develop-eggs eggs bin lib include share .Python .installed.cfg .mr.developer.cfg
.PHONY: code-analysis
code-analysis: ## Run static code analysis
@echo "$(GREEN)==> Run static code analysis$(RESET)"
bin/code-analysis
.PHONY: test
test: ## Run tests
@echo "$(GREEN)==> Run Tests$(RESET)"
bin/alltests --xml
.PHONY: test-acceptance
test-acceptance: ## Run acceptance tests
@echo "$(GREEN)==> Run Acceptance Tests$(RESET)"
export ROBOTSUITE_PREFIX=ONLYROBOT && bin/alltests -t ONLYROBOT --all --xml