-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 872 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 872 Bytes
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
CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>&1)
MASTER_BRANCH := master
PIPENV := pipenv
WITH_PIPENV := $(PIPENV) run
.EXPORT_ALL_VARIABLES:
PIPENV_VENV_IN_PROJECT=1
setup:
$(PIPENV) install --dev
check-on-master:
ifneq ($(CURRENT_BRANCH),$(MASTER_BRANCH))
$(error This operation is only available on the master branch)
else
@echo "Working on master"
endif
increase-build:
$(WITH_PIPENV) bumpversion build --no-tag
release-patch: check-on-master increase-build
$(WITH_PIPENV) bumpversion patch --verbose
git push --follow-tags
release-minor: check-on-master increase-build
$(WITH_PIPENV) bumpversion minor --verbose
git push --follow-tags
release-major: check-on-master increase-build
$(WITH_PIPENV) bumpversion major --verbose
git push --follow-tags
.PHONY: setup check-on-master release-patch release-minor release-major increase-build