1
0
Fork 0
mirror of synced 2024-06-01 18:20:20 +12:00
ArchiveBox/bin/release.sh

42 lines
990 B
Bash
Raw Normal View History

2020-07-28 22:11:30 +12:00
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
IFS=$'\n'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
source "$DIR/.venv/bin/activate"
cd "$DIR"
echo "[*] Fetching latest docs version"
cd "$DIR/docs"
git pull
echo "[*] Cleaning up build dirs"
cd "$DIR"
rm -Rf build dist
echo "[*] Bumping VERSION number"
nano "$DIR/archivebox/VERSION"
echo "[*] Building sdist and bdist_wheel"
python3 setup.py sdist bdist_wheel
echo "[*] Building sdist and bdist_wheel"
python3 setup.py sdist bdist_wheel
echo "[^] Uploading to test.pypi.org"
python3 -m twine upload --repository testpypi dist/*
echo "[^] Uploading to pypi.org"
python3 -m twine upload --repository pypi dist/*
echo "[√] Done. Now at version $(cat "$DIR/archivebox/VERSION")"