Skip to content

Commit

Permalink
Add script for version releases
Browse files Browse the repository at this point in the history
  • Loading branch information
embolalia committed Jan 25, 2015
1 parent 788f6a7 commit 13c5c64
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions contrib/release.sh
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!"

0 comments on commit 13c5c64

Please sign in to comment.