forked from etsi-cti-admin/robotframework-mockserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 1.63 KB
/
Makefile
File metadata and controls
52 lines (41 loc) · 1.63 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
MOCK_SERVER = mock_server
MOCK_TESTER = mock_tester
VERSION ?= $(shell grep -o "\([0-9]\+\.\)\+[0-9]\+" src/MockServerLibrary/version.py)
.DEFAULT_GOAL := help
.PHONY: help
help: ## Print help
@echo "------------------------------------------------------------------------"
@echo "MockServer Robot Framework Library"
@echo "------------------------------------------------------------------------"
@awk -F ":.*##" '/:.*##/ && ! /\t/ {printf "\033[36m%-25s\033[0m%s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
.PHONY: setup
setup: ## Setup dev environment
pip install -r requirements.txt
.PHONY: server/run
server/run: ## Run mock server
ROBOT_ARGS=$(ROBOT_ARGS) docker-compose up -d $(MOCK_SERVER)
.PHONY: server/stop
server/stop: ## Stop mock server
docker-compose down
.PHONY: tester/test
tester/test: ## Run integration tests
docker-compose up --build --force-recreate $(MOCK_TESTER)
.PHONY: lint
lint: ## Run static code analysis
flake8 src
.PHONY: clean
clean: ## Clean dist
rm -rf dist MANIFEST
.PHONY: release
release: clean ## Release package to PyPI
python setup.py sdist
twine upload dist/robotframework-mockserver-$(VERSION).tar.gz
.PHONY: version/tag
version/tag: ## Tag HEAD with new version tag
git tag -a $(VERSION) -m "$(VERSION)"
.PHONY: docs
docs: ## Generate library docs
python -m robot.libdoc src/MockServerLibrary ../etsi-cti-admin.github.io/docs/robotframework-mockserver-$(VERSION).html
ln -sf robotframework-mockserver-$(VERSION).html ../etsi-cti-admin.github.io/docs/robotframework-mockserver.html
git -C ../etsi-cti-admin.github.io add .
git -C ../etsi-cti-admin.github.io commit -m "robotframework-mockserver-$(VERSION)"