-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
39 lines (30 loc) · 1020 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
.PHONY: all clean test
PYTHON=python3
all: check_vsphere_bundle check_vsphere
check_vsphere_bundle:
pip install --no-cache-dir --no-compile --target allinone .
mv allinone/bin/check_vsphere allinone/__main__.py
$(PYTHON) -m zipapp -c -p '/usr/bin/env python3' allinone
rm -rf allinone
mv allinone.pyz check_vsphere_bundle
check_vsphere:
mkdir build
cp -av checkvsphere build/checkvsphere
mv build/checkvsphere/cli.py build/__main__.py
( cd build/; $(PYTHON) -m zipapp -c --output ../check_vsphere -p '/usr/bin/env python3' . )
rm -rf build
dist: pyproject.toml
$(PYTHON) -m build
chmod a+r dist/*
.PHONY: clean
clean:
rm -rf build allinone check_vsphere_bundle check_vsphere zip check_vsphere.zip build check_vsphere.egg-info dist
.PHONY: upload-test
upload-test: dist
$(PYTHON) -m twine upload --repository testpypi dist/*
.PHONY: upload-prod
upload-prod: dist
$(PYTHON) -m twine upload dist/*
.PHONY: upload-private
upload-private: dist
rsync -avH dist/* cb:~/public_html/simple/checkvsphere