forked from haidaraM/ansible-playbook-grapher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (24 loc) · 901 Bytes
/
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
ANSIBLE_VERSION=2.10.7
VIRTUALENV_DIR=venv-test-install
PACKAGE := dist/$(shell ls dist 2> /dev/null)
SRC=$(wildcard ansibleplaybookgrapher/*.py setup.py ansibleplaybookgrapher/data/*)
build: $(PACKAGE)
$(PACKAGE): $(SRC)
@echo "Building the package..."
@python setup.py bdist_wheel
# Deploy to Pypi Live environment
deploy: clean build
@echo "Deploying to Pypi Live environment..."
@twine upload dist/*
# Deploy to Pypi test environment
deploy_test: clean build
@echo "Deploying to Pypi Test environment..."
@twine upload --repository-url https://test.pypi.org/legacy/ dist/*
test_install: build
@./tests/test_install.sh $(VIRTUALENV_DIR) $(ANSIBLE_VERSION)
test:
cd tests && pytest
clean:
@echo "Cleaning..."
rm -rf ansible_playbook_grapher.egg-info build dist $(VIRTUALENV_DIR) tests/htmlcov tests/.pytest_cache .eggs tests/generated_svg tests/.coverage
.PHONY: clean test_install