Mercurial > kallithea
changeset 7191:dba4e770d4b6
make-release: cleanup and fix bitrot
Try to make the build process more stable and maintainable.
So far, this leaves a problem with node_modules/bootstrap/ and
kallithea/public/css/style.css missing from the release .tar.gz .
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 06 Mar 2018 01:27:15 +0100 |
parents | 710b2eb8cc37 |
children | 06ae370ffaa3 |
files | CONTRIBUTORS MANIFEST.in kallithea/templates/about.html kallithea/templates/base/base.html kallithea/tests/other/test_vcs_operations.py scripts/make-release |
diffstat | 6 files changed, 61 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/CONTRIBUTORS Wed Feb 28 21:20:59 2018 +0100 +++ b/CONTRIBUTORS Tue Mar 06 01:27:15 2018 +0100 @@ -1,24 +1,27 @@ List of contributors to Kallithea project: + Dominik Ruf <dominikruf@gmail.com> 2012 2014-2018 + Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> 2014-2018 + Branko Majic <branko@majic.rs> 2015 2018 + Mads Kiilerich <mads@kiilerich.com> 2016-2018 Mads Kiilerich <madski@unity3d.com> 2012-2017 Unity Technologies 2012-2017 Andrew Shadura <andrew@shadura.me> 2012 2014-2017 - Dominik Ruf <dominikruf@gmail.com> 2012 2014-2017 - Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> 2014-2017 + Étienne Gilli <etienne.gilli@gmail.com> 2015-2017 Søren Løvborg <sorenl@unity3d.com> 2015-2017 Sam Jaques <sam.jaques@me.com> 2015 2017 Asterios Dimitriou <steve@pci.gr> 2016-2017 - Mads Kiilerich <mads@kiilerich.com> 2016-2017 Alessandro Molina <alessandro.molina@axant.it> 2017 Anton Schur <tonich.sh@gmail.com> 2017 Ching-Chen Mao <mao@lins.fju.edu.tw> 2017 Eivind Tagseth <eivindt@gmail.com> 2017 FUJIWARA Katsunori <foozy@lares.dti.ne.jp> 2017 + Holger Schramm <info@schramm.by> 2017 Karl Goetz <karl@kgoetz.id.au> 2017 + Lars Kruse <devel@sumpfralle.de> 2017 Marko Semet <markosemet@googlemail.com> 2017 Viktar Vauchkevich <victorenator@gmail.com> 2017 Takumi IINO <trot.thunder@gmail.com> 2012-2016 - Étienne Gilli <etienne.gilli@gmail.com> 2015-2016 Jan Heylen <heyleke@gmail.com> 2015-2016 Robert Martinez <ntttq@inboxen.org> 2015-2016 Robert Rauch <mail@robertrauch.de> 2015-2016 @@ -40,7 +43,6 @@ Andrew Bartlett <abartlet@catalyst.net.nz> 2015 Balázs Úr <urbalazs@gmail.com> 2015 Ben Finney <ben@benfinney.id.au> 2015 - Branko Majic <branko@majic.rs> 2015 Daniel Hobley <danielh@unity3d.com> 2015 David Avigni <david.avigni@ankapi.com> 2015 Denis Blanchette <dblanchette@coveo.com> 2015
--- a/MANIFEST.in Wed Feb 28 21:20:59 2018 +0100 +++ b/MANIFEST.in Tue Mar 06 01:27:15 2018 +0100 @@ -12,6 +12,7 @@ include pytest.ini include requirements.txt include tox.ini +include package.json recursive-include docs * recursive-include init.d * recursive-include kallithea/alembic *
--- a/kallithea/templates/about.html Wed Feb 28 21:20:59 2018 +0100 +++ b/kallithea/templates/about.html Tue Mar 06 01:27:15 2018 +0100 @@ -24,11 +24,13 @@ necessarily limited to the following:</p> <ul> - <li>Copyright © 2012–2017, Mads Kiilerich</li> + <li>Copyright © 2012–2018, Mads Kiilerich</li> + <li>Copyright © 2012, 2014–2018, Dominik Ruf</li> + <li>Copyright © 2014–2018, Thomas De Schampheleire</li> + <li>Copyright © 2015, 2018, Branko Majic</li> <li>Copyright © 2012–2017, Unity Technologies</li> <li>Copyright © 2012, 2014–2017, Andrew Shadura</li> - <li>Copyright © 2012, 2014–2017, Dominik Ruf</li> - <li>Copyright © 2014–2017, Thomas De Schampheleire</li> + <li>Copyright © 2015–2017, Étienne Gilli</li> <li>Copyright © 2015–2017, Søren Løvborg</li> <li>Copyright © 2015, 2017, Sam Jaques</li> <li>Copyright © 2016–2017, Asterios Dimitriou</li> @@ -37,11 +39,12 @@ <li>Copyright © 2017, Ching-Chen Mao</li> <li>Copyright © 2017, Eivind Tagseth</li> <li>Copyright © 2017, FUJIWARA Katsunori</li> + <li>Copyright © 2017, Holger Schramm</li> <li>Copyright © 2017, Karl Goetz</li> + <li>Copyright © 2017, Lars Kruse</li> <li>Copyright © 2017, Marko Semet</li> <li>Copyright © 2017, Viktar Vauchkevich</li> <li>Copyright © 2012–2016, Takumi IINO</li> - <li>Copyright © 2015–2016, Étienne Gilli</li> <li>Copyright © 2015–2016, Jan Heylen</li> <li>Copyright © 2015–2016, Robert Martinez</li> <li>Copyright © 2015–2016, Robert Rauch</li> @@ -63,7 +66,6 @@ <li>Copyright © 2015, Andrew Bartlett</li> <li>Copyright © 2015, Balázs Úr</li> <li>Copyright © 2015, Ben Finney</li> - <li>Copyright © 2015, Branko Majic</li> <li>Copyright © 2015, Daniel Hobley</li> <li>Copyright © 2015, David Avigni</li> <li>Copyright © 2015, Denis Blanchette</li>
--- a/kallithea/templates/base/base.html Wed Feb 28 21:20:59 2018 +0100 +++ b/kallithea/templates/base/base.html Tue Mar 06 01:27:15 2018 +0100 @@ -23,7 +23,7 @@ <a class="navbar-link" href="${h.url('kallithea_project_url')}" target="_blank">Kallithea</a>, %endif which is - <a class="navbar-link" href="${h.canonical_url('about')}#copyright">© 2010–2017 by various authors & licensed under GPLv3</a>. + <a class="navbar-link" href="${h.canonical_url('about')}#copyright">© 2010–2018 by various authors & licensed under GPLv3</a>. %if c.issues_url: – <a class="navbar-link" href="${c.issues_url}" target="_blank">${_('Support')}</a> %endif
--- a/kallithea/tests/other/test_vcs_operations.py Wed Feb 28 21:20:59 2018 +0100 +++ b/kallithea/tests/other/test_vcs_operations.py Tue Mar 06 01:27:15 2018 +0100 @@ -609,7 +609,7 @@ # clone repo clone_url = webserver.repo_url(testfork[repo_type], username=TEST_USER_ADMIN_LOGIN, password=TEST_USER_ADMIN_PASS) dest_dir = _get_tmp_dir() - stdout, stderr = Command(TESTS_TMP_PATH)\ + stdout, stderr = Command(TESTS_TMP_PATH) \ .execute('%s clone' % repo_type, clone_url, dest_dir, ignoreReturnCode=True) if repo_type == 'hg': assert 'preoutgoing.testhook hook failed' in stdout
--- a/scripts/make-release Wed Feb 28 21:20:59 2018 +0100 +++ b/scripts/make-release Tue Mar 06 01:27:15 2018 +0100 @@ -2,60 +2,71 @@ 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 "Install/verify tools needed for building and uploading stuff" +pip install --upgrade -e . +pip install --upgrade -r dev_requirements.txt Sphinx Sphinx-PyPI-upload + +echo "Cleanup and update copyrights ... and clean checkout" +scripts/run-all-cleanup +scripts/update-copyrights.py +hg up -cr . -echo "Verifying everything can build" -hg purge --all dist -python2 setup.py build_sphinx -python2 setup.py compile_catalog # TODO: check for errors +echo "Make release build from clean checkout in build/" +rm -rf build dist +hg archive build +cd build + +echo "Check MANIFEST.in" +sed -e 's/[^ ]*[ ]*\([^ ]*\).*/\1/g' MANIFEST.in | grep -v '^node_modules/bootstrap\|^kallithea/public/css/style.css' | xargs ls -lad + +echo "Build dist" +python2 setup.py compile_catalog python2 setup.py sdist -echo "Verifying VERSION from kallithea/__init__.py" +echo "Verify VERSION from kallithea/__init__.py" namerel=$(cd dist && echo Kallithea-*.tar.gz) namerel=${namerel%.tar.gz} version=${namerel#Kallithea-} +ls -l $(pwd)/dist/$namerel.tar.gz 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 "Verify dist file content" +diff -u <((hg mani | grep -v '^\.hg') | LANG=C sort) <(tar tf dist/Kallithea-$version.tar.gz | sed "s|^$namerel/||" | grep . | grep -v '^kallithea/i18n/.*/LC_MESSAGES/kallithea.mo$\|^Kallithea.egg-info/\|^PKG-INFO$\|/$' | LANG=C sort) +! tar tf dist/Kallithea-$version.tar.gz | grep "$namerel/node_modules/bootstrap/\$" + +echo "Verify docs build" +python2 setup.py build_sphinx # not used yet ... but we want to make sure it builds + +cat - << EOT -echo "Building dist file" -python2 setup.py compile_catalog -python2 setup.py sdist - -echo "Verifying dist file content" -diff -u <(hg mani | grep -v '^\.hg' | LANG=C sort) <(tar tf dist/Kallithea-*.tar.gz | sed "s|^$namerel/||" | grep . | grep -v '^kallithea/i18n/.*/LC_MESSAGES/kallithea.mo$\|^Kallithea.egg-info/\|^PKG-INFO$\|/$' | LANG=C sort) +Now, make sure +* the copyright and contributor lists have been updated +* all tests are passing +* release note is ready +* announcement is ready +* source has been pushed to https://kallithea-scm.org/repos/kallithea -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 +EOT + +echo "Verify current revision is tagged for $version" +hg log -r "'$version'&." | grep . 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" +echo "Upload 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" +echo "Rebuild 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 + +extraargs=${EMAIL:+--identity=$EMAIL} +python2 setup.py sdist upload --sign $extraargs +xdg-open https://pypi.python.org/pypi/Kallithea