Changeset - dba4e770d4b6
[Not reviewed]
default
0 6 0
Mads Kiilerich (kiilerix) - 8 months ago 2018-03-06 00:27:15
mads@kiilerich.com
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 .
6 files changed with 61 insertions and 45 deletions:
0 comments (0 inline, 0 general)
CONTRIBUTORS
Show inline comments
 
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 @@ List of contributors to Kallithea projec
 
    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
MANIFEST.in
Show inline comments
...
 
@@ -12,6 +12,7 @@ include           development.ini
 
include           pytest.ini
 
include           requirements.txt
 
include           tox.ini
 
include           package.json
 
recursive-include docs *
 
recursive-include init.d *
 
recursive-include kallithea/alembic *
kallithea/templates/about.html
Show inline comments
...
 
@@ -24,11 +24,13 @@
 
  necessarily limited to the following:</p>
 
  <ul>
 

	
 
  <li>Copyright &copy; 2012&ndash;2017, Mads Kiilerich</li>
 
  <li>Copyright &copy; 2012&ndash;2018, Mads Kiilerich</li>
 
  <li>Copyright &copy; 2012, 2014&ndash;2018, Dominik Ruf</li>
 
  <li>Copyright &copy; 2014&ndash;2018, Thomas De Schampheleire</li>
 
  <li>Copyright &copy; 2015, 2018, Branko Majic</li>
 
  <li>Copyright &copy; 2012&ndash;2017, Unity Technologies</li>
 
  <li>Copyright &copy; 2012, 2014&ndash;2017, Andrew Shadura</li>
 
  <li>Copyright &copy; 2012, 2014&ndash;2017, Dominik Ruf</li>
 
  <li>Copyright &copy; 2014&ndash;2017, Thomas De Schampheleire</li>
 
  <li>Copyright &copy; 2015&ndash;2017, Étienne Gilli</li>
 
  <li>Copyright &copy; 2015&ndash;2017, Søren Løvborg</li>
 
  <li>Copyright &copy; 2015, 2017, Sam Jaques</li>
 
  <li>Copyright &copy; 2016&ndash;2017, Asterios Dimitriou</li>
...
 
@@ -37,11 +39,12 @@
 
  <li>Copyright &copy; 2017, Ching-Chen Mao</li>
 
  <li>Copyright &copy; 2017, Eivind Tagseth</li>
 
  <li>Copyright &copy; 2017, FUJIWARA Katsunori</li>
 
  <li>Copyright &copy; 2017, Holger Schramm</li>
 
  <li>Copyright &copy; 2017, Karl Goetz</li>
 
  <li>Copyright &copy; 2017, Lars Kruse</li>
 
  <li>Copyright &copy; 2017, Marko Semet</li>
 
  <li>Copyright &copy; 2017, Viktar Vauchkevich</li>
 
  <li>Copyright &copy; 2012&ndash;2016, Takumi IINO</li>
 
  <li>Copyright &copy; 2015&ndash;2016, Étienne Gilli</li>
 
  <li>Copyright &copy; 2015&ndash;2016, Jan Heylen</li>
 
  <li>Copyright &copy; 2015&ndash;2016, Robert Martinez</li>
 
  <li>Copyright &copy; 2015&ndash;2016, Robert Rauch</li>
...
 
@@ -63,7 +66,6 @@
 
  <li>Copyright &copy; 2015, Andrew Bartlett</li>
 
  <li>Copyright &copy; 2015, Balázs Úr</li>
 
  <li>Copyright &copy; 2015, Ben Finney</li>
 
  <li>Copyright &copy; 2015, Branko Majic</li>
 
  <li>Copyright &copy; 2015, Daniel Hobley</li>
 
  <li>Copyright &copy; 2015, David Avigni</li>
 
  <li>Copyright &copy; 2015, Denis Blanchette</li>
kallithea/templates/base/base.html
Show inline comments
...
 
@@ -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">&copy; 2010&ndash;2017 by various authors &amp; licensed under GPLv3</a>.
 
        <a class="navbar-link" href="${h.canonical_url('about')}#copyright">&copy; 2010&ndash;2018 by various authors &amp; licensed under GPLv3</a>.
 
        %if c.issues_url:
 
            &ndash; <a class="navbar-link" href="${c.issues_url}" target="_blank">${_('Support')}</a>
 
        %endif
kallithea/tests/other/test_vcs_operations.py
Show inline comments
...
 
@@ -609,7 +609,7 @@ class TestVCSOperations(TestController):
 
        # 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
scripts/make-release
Show inline comments
...
 
@@ -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
0 comments (0 inline, 0 general)