Mercurial > kallithea
view scripts/make-release @ 5725:05a85a6cecba
graph: detect git branches and colourise them properly without rainbow effect (Issue #188)
This is based on research and patches by Andrew Shadura.
When using Git, only commits pointed to by branch references have their
branches set. In general, there's no way in Git to find out which branch
a commit belongs to, so we can try to deduce that from the merge topology.
In other words, if we know the branch name, we know it's a different colour
than any different branch. If we don't (it is None), we guesstimate the first
parent is probably on the same branch. The relevant part of the code before
2da0dc09 used a similar, yet simpler, algorithm.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 22 Feb 2016 21:07:47 +0100 |
parents | 80b69729a0e2 |
children | 87496864d4c6 d06c0566cb23 |
line wrap: on
line source
#!/bin/bash set -e set -x echo "Checking tools needed for uploading stuff" pip freeze | grep '^Sphinx==' || pip install Sphinx pip freeze | grep '^Sphinx-PyPI-upload==' || pip install Sphinx-PyPI-upload echo "Verifying everything can build" hg purge --all dist python2 setup.py build_sphinx python2 setup.py compile_catalog # TODO: check for errors python2 setup.py sdist echo "Verifying VERSION from kallithea/__init__.py" namerel=$(cd dist && echo Kallithea-*.tar.gz) namerel=${namerel%.tar.gz} version=${namerel#Kallithea-} echo "Releasing Kallithea $version in directory $namerel" echo "Verifying current revision is tagged for $version" hg log -r "'$version'&." | grep . echo "Cleaning before making release build" hg up -c . hg revert -a -r null hg up -C "'$version'&." hg purge --all echo "Building dist file" python2 setup.py compile_catalog python2 setup.py sdist echo "Verifying dist file content" tar tf dist/Kallithea-*.tar.gz | sed "s|^$namerel/||" | LANG=C sort > scripts/manifest hg diff hg up -c . # fail if manifest changed echo "Now, make sure" echo "* the copyright and contributor lists have been updated" echo "* all tests are passing" echo "* release note is ready" echo "* announcement is ready" echo "* source has been pushed to https://kallithea-scm.org/repos/kallithea" echo echo -n "Enter \"pypi\" to upload Kallithea $version to pypi: " read answer [ "$answer" = "pypi" ] extraargs=${EMAIL:+--identity=$EMAIL} python2 setup.py sdist upload --sign $extraargs xdg-open https://pypi.python.org/pypi/Kallithea echo "Uploading docs to pypi" # See https://wiki.python.org/moin/PyPiDocumentationHosting python2 setup.py build_sphinx upload_sphinx xdg-open https://pythonhosted.org/Kallithea/ xdg-open http://packages.python.org/Kallithea/installation.html echo "Rebuilding readthedocs for docs.kallithea-scm.org" xdg-open https://readthedocs.org/projects/kallithea/ curl -X POST http://readthedocs.org/build/kallithea xdg-open https://readthedocs.org/builds/kallithea/ xdg-open http://docs.kallithea-scm.org/en/latest/ # or whatever the branch is