-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·33 lines (29 loc) · 839 Bytes
/
deploy.sh
File metadata and controls
executable file
·33 lines (29 loc) · 839 Bytes
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
# read version
VERSION=$(python3 -c "from setup import version; print(version)")
echo "version:" $VERSION
# remove caches
echo "Removing caches..."
sudo rm -rf build/
sudo rm -rf dist/
sudo rm -rf *.egg-info/
sudo rm -rf patchmentation/*.egg-info/
# build
echo "Building wheel..."
python3 setup.py bdist_wheel
# upload
if [[ $1 == "PyPI" ]]; then
echo "Uploading to PyPI..."
twine upload dist/*
elif [[ $1 == "Test PyPI" ]] || [[ $1 == "TestPyPI" ]]; then
echo "Uploading to Test PyPI..."
twine upload --repository testpypi dist/*
else
echo "No arguments are given. [Provide \"PyPI\" to upload to PyPI or \"Test PyPI\" to upload to Test PyPI]"
echo "Upload failed."
fi
# remove caches
echo "Removing caches..."
sudo rm -rf build/
sudo rm -rf dist/
sudo rm -rf *.egg-info/
sudo rm -rf patchmentation/*.egg-info/