-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
108 lines (89 loc) · 2.25 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/usr/bin/make -sf
# force use of Bash
SHELL := /bin/bash
INTERACTIVE=true
BASH_VERSION := 5
ELVISH_VERSION := latest # pre-release
FISH_VERSION := 3.7.0
KSH_VERSION := 2012-08-01
PWSH_VERSION := 6.1.3-alpine-3.8
TCSH_VERSION := 6.20.00
XONSH_VERSION := latest
ZSH_VERSION := 5.9-r2
.PHONY: default
default: tests
.PHONY: tests
tests:
clear
pytest --verbose --cov=pure tests/
.PHONY: tests-unit-only
tests-unit-only:
pytest --verbose --cov=pure tests/ --ignore=tests/integration_test.py
.PHONY: tests-integration-only
tests-integration-only:
pytest --verbose --cov=pure tests/integration_test.py
shell = $*
shell_name = $(shell echo '$*' | tr '[:lower:]' '[:upper:]')
shell_version = ${${shell_name}_VERSION}
show-versions:
@echo "Bash: ${BASH_VERSION}"
@echo "Elvish: ${ELVISH_VERSION}"
@echo "Fish: ${FISH_VERSION}"
@echo "Ksh: ${KSH_VERSION}"
@echo "Pwsh: ${PWSH_VERSION}"
@echo "Tcsh: ${TCSH_VERSION}"
@echo "Xonsh: ${XONSH_VERSION}"
@echo "Zsh: ${ZSH_VERSION}"
.PHONY: build-pure-on-%
build-pure-on-%:
@echo ${shell} ${shell_version}
docker build \
--file ./containers/${shell}.Dockerfile \
--tag=pure-on-${shell}-${shell_version} \
--build-arg ARGS="VERSION=${shell_version}" \
--pull \
./
.PHONY: dev-pure-on-%
dev-pure-on-%:
@echo ${shell} ${shell_version}
docker run \
--name run-pure-on-${shell} \
--rm \
--interactive \
--tty \
--volume=$$PWD:/home/pure/.pure/ \
pure-on-${shell}-${shell_version}
.PHONY: install-requirements
install-requirements:
apt install --yes \
python3-dbus \
python3-keyring \
python-secretstorage
pipenv install \
--dev \
setuptools \
wheel \
twine \
keyring
.PHONY: generate-package
generate-package:
rm build/ dist/ pure.egg-info/ -rf
python3 setup.py sdist bdist_wheel
.PHONY: upload-package
upload-package:
twine upload --username edouard-lopez dist/*
.PHONY: setup-keyring
setup-keyring:
keyring set https://upload.pypi.org/legacy/ edouard-lopez
.PHONY: publish-to-pipy
publish-to-pipy:
pdm publish \
--username edouard-lopez \
--password "$$PURE_PYPI_TOKEN" \
--repository https://pypi.org/simple
.PHONY: publish-to-test-pipy
publish-to-test-pipy:
pdm publish \
--username edouard-lopez \
--password "$$PURE_PYPI_TOKEN" \
--repository https://test.pypi.org/simple