Show More
@@ -1,62 +1,63 b'' | |||||
1 | #!/bin/bash |
|
1 | #!/bin/bash | |
2 | set -e |
|
2 | set -e | |
3 | set -x |
|
3 | set -x | |
4 |
|
4 | |||
5 | echo "Checking tools needed for uploading stuff" |
|
5 | echo "Checking tools needed for uploading stuff" | |
6 | pip freeze | grep '^Sphinx==' || pip install Sphinx |
|
6 | pip freeze | grep '^Sphinx==' || pip install Sphinx | |
7 | pip freeze | grep '^Sphinx-PyPI-upload==' || pip install Sphinx-PyPI-upload |
|
7 | pip freeze | grep '^Sphinx-PyPI-upload==' || pip install Sphinx-PyPI-upload | |
8 |
|
8 | |||
9 | echo "Verifying everything can build" |
|
9 | echo "Verifying everything can build" | |
10 | hg purge --all dist |
|
10 | hg purge --all dist | |
11 | python2 setup.py build_sphinx |
|
11 | python2 setup.py build_sphinx | |
12 | python2 setup.py compile_catalog # TODO: check for errors |
|
12 | python2 setup.py compile_catalog # TODO: check for errors | |
13 | python2 setup.py sdist |
|
13 | python2 setup.py sdist | |
14 |
|
14 | |||
15 | echo "Verifying VERSION from kallithea/__init__.py" |
|
15 | echo "Verifying VERSION from kallithea/__init__.py" | |
16 | namerel=$(cd dist && echo Kallithea-*.tar.gz) |
|
16 | namerel=$(cd dist && echo Kallithea-*.tar.gz) | |
17 | namerel=${namerel%.tar.gz} |
|
17 | namerel=${namerel%.tar.gz} | |
18 | version=${namerel#Kallithea-} |
|
18 | version=${namerel#Kallithea-} | |
19 | echo "Releasing Kallithea $version in directory $namerel" |
|
19 | echo "Releasing Kallithea $version in directory $namerel" | |
20 | echo "Verifying current revision is tagged for $version" |
|
20 | echo "Verifying current revision is tagged for $version" | |
21 | hg log -r "'$version'&." | grep . |
|
21 | hg log -r "'$version'&." | grep . | |
22 |
|
22 | |||
23 | echo "Cleaning before making release build" |
|
23 | echo "Cleaning before making release build" | |
24 | hg up -c . |
|
24 | hg up -c . | |
25 | hg revert -a -r null |
|
25 | hg revert -a -r null | |
26 | hg up -C "'$version'&." |
|
26 | hg up -C "'$version'&." | |
27 | hg purge --all |
|
27 | hg purge --all | |
28 |
|
28 | |||
29 | echo "Building dist file" |
|
29 | echo "Building dist file" | |
30 | python2 setup.py compile_catalog |
|
30 | python2 setup.py compile_catalog | |
31 | python2 setup.py sdist |
|
31 | python2 setup.py sdist | |
32 |
|
32 | |||
33 | echo "Verifying dist file content" |
|
33 | echo "Verifying dist file content" | |
34 | tar tf dist/Kallithea-*.tar.gz | sed "s|^$namerel/||" | LANG=C sort > scripts/manifest |
|
34 | tar tf dist/Kallithea-*.tar.gz | sed "s|^$namerel/||" | LANG=C sort > scripts/manifest | |
35 | hg diff |
|
35 | hg diff | |
36 | hg up -c . # fail if manifest changed |
|
36 | hg up -c . # fail if manifest changed | |
37 |
|
37 | |||
38 | echo "Now, make sure" |
|
38 | echo "Now, make sure" | |
39 | echo "* the copyright and contributor lists have been updated" |
|
39 | echo "* the copyright and contributor lists have been updated" | |
40 | echo "* all tests are passing" |
|
40 | echo "* all tests are passing" | |
41 | echo "* release note is ready" |
|
41 | echo "* release note is ready" | |
42 | echo "* announcement is ready" |
|
42 | echo "* announcement is ready" | |
43 | echo "* source has been pushed to https://kallithea-scm.org/repos/kallithea" |
|
43 | echo "* source has been pushed to https://kallithea-scm.org/repos/kallithea" | |
44 | echo |
|
44 | echo | |
45 |
|
45 | |||
46 | echo -n "Enter \"pypi\" to upload Kallithea $version to pypi: " |
|
46 | echo -n "Enter \"pypi\" to upload Kallithea $version to pypi: " | |
47 | read answer |
|
47 | read answer | |
48 | [ "$answer" = "pypi" ] |
|
48 | [ "$answer" = "pypi" ] | |
49 | python2 setup.py sdist upload --sign |
|
49 | extraargs=${EMAIL:+--identity=$EMAIL} | |
|
50 | python2 setup.py sdist upload --sign $extraargs | |||
50 | xdg-open https://pypi.python.org/pypi/Kallithea |
|
51 | xdg-open https://pypi.python.org/pypi/Kallithea | |
51 |
|
52 | |||
52 | echo "Uploading docs to pypi" |
|
53 | echo "Uploading docs to pypi" | |
53 | # See https://wiki.python.org/moin/PyPiDocumentationHosting |
|
54 | # See https://wiki.python.org/moin/PyPiDocumentationHosting | |
54 | python2 setup.py build_sphinx upload_sphinx |
|
55 | python2 setup.py build_sphinx upload_sphinx | |
55 | xdg-open https://pythonhosted.org/Kallithea/ |
|
56 | xdg-open https://pythonhosted.org/Kallithea/ | |
56 | xdg-open http://packages.python.org/Kallithea/installation.html |
|
57 | xdg-open http://packages.python.org/Kallithea/installation.html | |
57 |
|
58 | |||
58 | echo "Rebuilding readthedocs for docs.kallithea-scm.org" |
|
59 | echo "Rebuilding readthedocs for docs.kallithea-scm.org" | |
59 | xdg-open https://readthedocs.org/projects/kallithea/ |
|
60 | xdg-open https://readthedocs.org/projects/kallithea/ | |
60 | curl -X POST http://readthedocs.org/build/kallithea |
|
61 | curl -X POST http://readthedocs.org/build/kallithea | |
61 | xdg-open https://readthedocs.org/builds/kallithea/ |
|
62 | xdg-open https://readthedocs.org/builds/kallithea/ | |
62 | xdg-open http://docs.kallithea-scm.org/en/latest/ # or whatever the branch is |
|
63 | xdg-open http://docs.kallithea-scm.org/en/latest/ # or whatever the branch is |
General Comments 0
You need to be logged in to leave comments.
Login now