forked from zostera/django-bootstrap3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (44 loc) · 865 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
VERSION := $(shell hatch version)
.PHONY: test
test:
hatch run test
.PHONY: tests
tests:
hatch run all:test
.PHONY: reformat
reformat:
hatch run lint:fmt
.PHONY: lint
lint:
hatch run lint:style
.PHONY: docs
docs:
hatch run docs:build
.PHONY: example
example:
hatch run example:runserver
.PHONY: porcelain
porcelain:
ifeq ($(shell git status --porcelain),)
@echo "Working directory is clean."
else
@echo "Error - working directory is dirty. Commit those changes!";
@exit 1;
endif
.PHONY: branch
branch:
ifeq ($(shell git rev-parse --abbrev-ref HEAD),main)
@echo "On branch main."
else
@echo "Error - Not on branch main!"
@exit 1;
endif
.PHONY: build
build: docs
rm -rf build dist src/*.egg-info
hatch build
.PHONY: publish
publish: porcelain branch build
hatch publish
git tag -a v${VERSION} -m "Release ${VERSION}"
git push origin --tags