Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 37 lines (29 sloc) 0.756 kB
c64822a @bboe Added deploy script and version bump.
bboe authored
1 #!/bin/bash
2
3 status=$(git status | head -n 1)
4 if [[ "$status" != "# On branch master" ]]; then
5 echo "Not on master branch. Goodbye"
6 exit 1
7 fi
8
78d8d23 @bboe Version bump and fix version number handling for setup.py and sphinx.
bboe authored
9 lines=$(git status | wc -l)
10 if [ $lines -ne 2 ]; then
11 echo "There are pending changes. Goodbye"
1368536 @bboe Remove hack from setup.py and version bump.
bboe authored
12 exit 1
13 fi
14
2d91358 @bboe Quick fix for update_settings with header_hover_text. Version bump.
bboe authored
15 version=$(python -c "import reddit; print reddit.__version__")
78d8d23 @bboe Version bump and fix version number handling for setup.py and sphinx.
bboe authored
16
17 read -p "Do you want to deploy $version? [y/n] " input
c64822a @bboe Added deploy script and version bump.
bboe authored
18 case $input in
273bb76 @bboe Properly add COPYING file to deployment.
bboe authored
19 [Yy]* ) ;;
c64822a @bboe Added deploy script and version bump.
bboe authored
20 * ) echo "Goodbye"; exit 1;;
21 esac
22
23 python setup.py sdist upload -s
24 if [ $? -ne 0 ]; then
25 echo "Pushing distribution failed. Aborting."
26 exit 1
27 fi
28
78d8d23 @bboe Version bump and fix version number handling for setup.py and sphinx.
bboe authored
29 git tag -s $version -m "Version $version"
c64822a @bboe Added deploy script and version bump.
bboe authored
30 if [ $? -ne 0 ]; then
31 echo "Tagging version failed. Aborting."
32 exit 1
33 fi
34
35 git push bboe master --tags
36 git push mellort master --tags
Something went wrong with that request. Please try again.