-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (31 loc) · 1007 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
VERS?=0.12.0
VERS_FILE=./version.py
.PHONY: update_version
update_version:
/bin/rm -f $(VERS_FILE)
@echo "" >> $(VERS_FILE)
@echo "version = \"$(VERS)\"" >> $(VERS_FILE)
/bin/cat $(VERS_FILE)
.PHONY: check_git
check_git:
@if [ "a" != "a$$(git status --untracked-files=no --porcelain)" ]; \
then \
echo "There are local changes. git status should be clean."; \
false; \
fi
@if [ "a" != "a$$(git tag -l $(VERS))" ]; \
then \
echo Tag $(VERS) already exists. Remove this tag and retry, if you are sure.; \
false; \
fi
@echo "Are you sure you want to make release version $(VERS)? The command will update setup.py and commit and push new git tag. [y/N] " && read ans && [ $${ans:-N} = y ]
# TODO: this needs to be removed after the new release process is established
.PHONY: release
release: check_git update_version
git commit -am "v$(VERS) release"
git tag -a v$(VERS) -m "v$(VERS) release"
git push
git push origin --tags
.PHONY: install
install:
SKIP_PB_BIN=true pip3 install .