-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (57 loc) · 1.3 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
# https://github.com/sio/Makefile.venv
# Seamlessly manage Python virtual environment with a Makefile
Makefile.venv:
curl \
-o Makefile.fetched \
-L "https://github.com/sio/Makefile.venv/raw/v2023.04.17/Makefile.venv"
echo "fb48375ed1fd19e41e0cdcf51a4a0c6d1010dfe03b672ffc4c26a91878544f82 *Makefile.fetched" \
| sha256sum --check - \
&& mv Makefile.fetched Makefile.venv
include Makefile.venv
.PHONY: all
all: Makefile.venv $(VENV) install test
.PHONY: install
install: Makefile.venv $(VENV)
$(VENV)/pip install -r requirements.txt
.PHONY: create
create:
$(VENV)/molecule create
.PHONY: converge
converge:
$(VENV)/molecule converge
.PHONY: login
login:
$(VENV)/molecule login
.PHONY: test
test: install
$(VENV)/molecule test
.PHONY: lint
lint: $(VENV) yamllint ansible-lint
.PHONY: yamllint
yamllint: install
$(VENV)/yamllint .
.PHONY: ansible-lint
ansible-lint: install
$(VENV)/ansible-lint .
.PHONY: destroy
destroy:
$(VENV)/molecule destroy
.PHONY: release
VERSION?=minor
# target: release - Bump version
release:
$(VENV)/pip install bumpversion
@bumpversion $(VERSION)
@git checkout master
@git merge devel
@git checkout devel
@git push --all
@git push --tags
.PHONY: minor
minor: release
.PHONY: patch
patch:
make release VERSION=patch
.PHONY: major
major:
make release VERSION=major