Changeset - d06c0566cb23
[Not reviewed]
stable
0 2 0
Thomas De Schampheleire - 8 years ago 2018-03-18 21:54:48
thomas.de_schampheleire@nokia.com
make-release: import version and copyright updates from default branch (dba4e770d4b6)

make-release has been improved on the default branch in commit dba4e770d4b6,
and that version of the script also almost works on stable.

There are some parts we don't have in stable branch: dev_requirements.txt,
run-all-cleanup, and a working dist file content check:

The MANIFEST.in file on the stable branch is not complete.
Most of the missing entries could simply be added
(.travis.yml, requirements.txt, tox.ini, and scripts/*) but there is one
problematic entry: kallithea/i18n/en/LC_MESSAGES/kallithea.mo.
In the check command, all .mo entries are filtered out, causing a remaining
diff for the English .mo.

As that file has been removed on the default branch already, and the missing
entries are not important for the release anyway, simply drop the check
for now.
2 files changed with 43 insertions and 35 deletions:
0 comments (0 inline, 0 general)
scripts/make-release
Show inline comments
 
#!/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 "Install/verify tools needed for building and uploading stuff"
 
pip install --upgrade -e .
 
pip install --upgrade Sphinx Sphinx-PyPI-upload
 

	
 
echo "Cleanup and update copyrights ... and clean checkout"
 
scripts/whitespacecleanup.sh
 
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"
 
! 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
 
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 "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
 
EOT
 

	
 
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 "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
scripts/update-copyrights.py
Show inline comments
 
@@ -64,25 +64,25 @@ name_fixes['Leonardo Carneiro<leonardo@u
 
name_fixes['leonardo'] = "Leonardo Carneiro <leonardo@unity3d.com>"
 
name_fixes['Leonardo <leo@unity3d.com>'] = "Leonardo Carneiro <leonardo@unity3d.com>"
 
name_fixes['Les Peabody'] = "Les Peabody <lpeabody@gmail.com>"
 
name_fixes['"Lorenzo M. Catucci" <lorenzo@sancho.ccd.uniroma2.it>'] = "Lorenzo M. Catucci <lorenzo@sancho.ccd.uniroma2.it>"
 
name_fixes['Lukasz Balcerzak'] = "Łukasz Balcerzak <lukaszbalcerzak@gmail.com>"
 
name_fixes['mao <mao@lins.fju.edu.tw>'] = "Ching-Chen Mao <mao@lins.fju.edu.tw>"
 
name_fixes['marcink'] = "Marcin Kuźmiński <marcin@python-works.com>"
 
name_fixes['Marcin Kuzminski'] = "Marcin Kuźmiński <marcin@python-works.com>"
 
name_fixes['nansenat16@null.tw'] = "nansenat16 <nansenat16@null.tw>"
 
name_fixes['Peter Vitt'] = "Peter Vitt <petervitt@web.de>"
 
name_fixes['philip.j@hostdime.com'] = "Philip Jameson <philip.j@hostdime.com>"
 
name_fixes['Søren Løvborg'] = "Søren Løvborg <sorenl@unity3d.com>"
 
name_fixes['Thomas De Schampheleire'] = "Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>"
 
name_fixes['Thomas De Schampheleire'] = "Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>"
 
name_fixes['Weblate'] = "<>"
 
name_fixes['xpol'] = "xpol <xpolife@gmail.com>"
 

	
 

	
 
# Some committer email address domains that indicate that another entity might
 
# hold some copyright too:
 
domain_extra = {}
 
domain_extra['unity3d.com'] = "Unity Technologies"
 
domain_extra['rhodecode.com'] = "RhodeCode GmbH"
 

	
 
# Repository history show some old contributions that traditionally hasn't been
 
# listed in about.html - preserve that:
0 comments (0 inline, 0 general)