Mercurial > kallithea
annotate scripts/make-release @ 5885:f0b9706d8d7e
scripts: introduce scripts/run-all-cleanup - run this before committing to make sure some aspects of the coding style is maintained
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 02 May 2016 23:45:26 +0200 |
parents | 80b69729a0e2 |
children | 87496864d4c6 d06c0566cb23 |
rev | line source |
---|---|
5507
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
1 #!/bin/bash |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
2 set -e |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
3 set -x |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
4 |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
5 echo "Checking tools needed for uploading stuff" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
6 pip freeze | grep '^Sphinx==' || pip install Sphinx |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
7 pip freeze | grep '^Sphinx-PyPI-upload==' || pip install Sphinx-PyPI-upload |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
8 |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
9 echo "Verifying everything can build" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
10 hg purge --all dist |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
11 python2 setup.py build_sphinx |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
12 python2 setup.py compile_catalog # TODO: check for errors |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
13 python2 setup.py sdist |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
14 |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
15 echo "Verifying VERSION from kallithea/__init__.py" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
16 namerel=$(cd dist && echo Kallithea-*.tar.gz) |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
17 namerel=${namerel%.tar.gz} |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
18 version=${namerel#Kallithea-} |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
19 echo "Releasing Kallithea $version in directory $namerel" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
20 echo "Verifying current revision is tagged for $version" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
21 hg log -r "'$version'&." | grep . |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
22 |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
23 echo "Cleaning before making release build" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
24 hg up -c . |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
25 hg revert -a -r null |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
26 hg up -C "'$version'&." |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
27 hg purge --all |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
28 |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
29 echo "Building dist file" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
30 python2 setup.py compile_catalog |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
31 python2 setup.py sdist |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
32 |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
33 echo "Verifying dist file content" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
34 tar tf dist/Kallithea-*.tar.gz | sed "s|^$namerel/||" | LANG=C sort > scripts/manifest |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
35 hg diff |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
36 hg up -c . # fail if manifest changed |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
37 |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
38 echo "Now, make sure" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
39 echo "* the copyright and contributor lists have been updated" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
40 echo "* all tests are passing" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
41 echo "* release note is ready" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
42 echo "* announcement is ready" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
43 echo "* source has been pushed to https://kallithea-scm.org/repos/kallithea" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
44 echo |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
45 |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
46 echo -n "Enter \"pypi\" to upload Kallithea $version to pypi: " |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
47 read answer |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
48 [ "$answer" = "pypi" ] |
5527
80b69729a0e2
scripts: allow signing with a different key set with EMAIL
Andrew Shadura <andrew@shadura.me>
parents:
5507
diff
changeset
|
49 extraargs=${EMAIL:+--identity=$EMAIL} |
80b69729a0e2
scripts: allow signing with a different key set with EMAIL
Andrew Shadura <andrew@shadura.me>
parents:
5507
diff
changeset
|
50 python2 setup.py sdist upload --sign $extraargs |
5507
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
51 xdg-open https://pypi.python.org/pypi/Kallithea |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
52 |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
53 echo "Uploading docs to pypi" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
54 # See https://wiki.python.org/moin/PyPiDocumentationHosting |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
55 python2 setup.py build_sphinx upload_sphinx |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
56 xdg-open https://pythonhosted.org/Kallithea/ |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
57 xdg-open http://packages.python.org/Kallithea/installation.html |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
58 |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
59 echo "Rebuilding readthedocs for docs.kallithea-scm.org" |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
60 xdg-open https://readthedocs.org/projects/kallithea/ |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
61 curl -X POST http://readthedocs.org/build/kallithea |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
62 xdg-open https://readthedocs.org/builds/kallithea/ |
d4f66ca15110
release: add scripts/make-release for automation of the release process
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
63 xdg-open http://docs.kallithea-scm.org/en/latest/ # or whatever the branch is |