-
-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
# Runs through the steps to release a Willie version. This is only useful to | ||
# the people with permissions to do so, of course. | ||
set -e | ||
cd $(dirname $0)/.. | ||
|
||
version=$(python -c "import willie; print(willie.__version__)") | ||
echo "Releasing Willie version $version." | ||
|
||
echo "PyPI username:" | ||
read pypi_user | ||
echo "PyPI password:" | ||
read pypi_pass | ||
echo "willie.dftba.net username:" | ||
read server_user | ||
|
||
cat <<EOF > ~/.pypirc | ||
[distutils] | ||
index-servers = | ||
pypi | ||
[pypi] | ||
username:$pypi_user | ||
password:$pypi_pass | ||
EOF | ||
|
||
echo "Building package and uploading to PyPI..." | ||
./setup.py sdist upload --sign | ||
rm ~/.pypirc | ||
|
||
echo "Updating download file on willie.dftba.net..." | ||
ssh $server_user@willie.dftba.net "cd /var/www/willie/files; wget -O willie-$version.tar.gz https://github.com/embolalia/willie/archive/$version.tar.gz" | ||
|
||
echo "Building docs..." | ||
cd docs | ||
make html | ||
|
||
echo "Setting up folders on willie.dftba.net..." | ||
ssh $server_user@willie.dftba.net "mkdir /var/www/willie/$version; rm /var/www/willie/docs; ln -s /var/www/willie/$version/docs /var/www/willie/docs" | ||
|
||
echo "Uploading docs..." | ||
scp -r build/html $server_user@willie.dftba.net:/var/www/willie/$version/docs | ||
|
||
echo "Done!" |