forked from jayfk/statuspage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (32 loc) · 1.49 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
GITHUB_USER=jayfk
GITHUB_REPO=statuspage
GITHUB_RELEASE := $(shell which github-release)
all: osx linux
release:
ifndef version
$(error version is undefined. usage: make release version=x.x)
endif
ifndef GITHUB_TOKEN
$(error GITHUB_TOKEN is undefined.)
endif
ifndef GITHUB_RELEASE
$(error no github-release binary found)
endif
sed -i '' 's/__version__ = "[^0-9.]*\([0-9.]*\).*"/__version__ = "$(version)"/' statuspage/statuspage.py
sed -i '' 's/__version__ = "[^0-9.]*\([0-9.]*\).*"/__version__ = "$(version)"/' setup.py
git commit -a -m 'new release $(version)'
git tag $(version)
git push origin master --tags
make all
python setup.py sdist bdist_wheel upload
github-release release --user $(GITHUB_USER) --repo $(GITHUB_REPO) --tag $(version) --name $(version)
github-release upload --user $(GITHUB_USER) --repo $(GITHUB_REPO) --tag $(version) --name 'statuspage-darwin-64' --file dist/statuspage-darwin-64
github-release upload --user $(GITHUB_USER) --repo $(GITHUB_REPO) --tag $(version) --name 'statuspage-linux-64' --file dist/statuspage-linux-64
osx:
pip install -r requirements/base.txt
pip install -r requirements/dev.txt
pyinstaller statuspage/statuspage.spec
mv dist/statuspage dist/statuspage-darwin-64
linux:
docker run -e LC_ALL="C.UTF-8" -e LANG="C.UTF-8" -v $(shell pwd):/app -w=/app -it python:3.5 bash -c "pip install -r requirements/base.txt && pip install -r requirements/dev.txt && pyinstaller statuspage/statuspage.spec"
mv dist/statuspage dist/statuspage-linux-64