##// END OF EJS Templates
hg: Redirect Mercurial stdout/stderr to logging when running as WSGI...
hg: Redirect Mercurial stdout/stderr to logging when running as WSGI Any "console" output from Mercurial when Kallithea is running from WSGI should end up in Kallithea's logs. That seems like a nice general feature. This will however also solve another rare but more critical problem: Mercurial is writing to sys.stdout / sys.stderr, using several layers of wrapping. Since Mercurial 5.5 (with https://repo.mercurial-scm.org/hg/rev/8e04607023e5 ), all writes are given a memoryview. Apache httpd mod_wsgi is invoking the WSGI with a custom mod_wsgi.Log injected in sys.stdout / sys.stderr . This logger can however not handle memoryview - https://github.com/GrahamDumpleton/mod_wsgi/issues/863 .

File last commit:

r8355:61bd04b9 default
r8795:fe050a93 stable
Show More
make-release
81 lines | 2.4 KiB | text/plain | TextLexer
Mads Kiilerich
release: add scripts/make-release for automation of the release process
r5507 #!/bin/bash
set -e
set -x
Thomas De Schampheleire
make-release: use a fresh virtualenv for building the release...
r7138 cleanup()
{
echo "Removing venv $venv"
rm -rf "$venv"
}
echo "Checking that you are NOT inside a virtualenv"
[ -z "$VIRTUAL_ENV" ]
venv=$(mktemp -d --tmpdir kallithea-release-XXXXX)
trap cleanup EXIT
echo "Setting up a fresh virtualenv in $venv"
Mads Kiilerich
py3: use "python3 -m venv" instead of virtualenv package
r8073 python3 -m venv "$venv"
Thomas De Schampheleire
make-release: use a fresh virtualenv for building the release...
r7138 . "$venv/bin/activate"
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 echo "Install/verify tools needed for building and uploading stuff"
Thomas De Schampheleire
scripts/make-release: install ldap and pam to fix isort instabilities...
r7867 pip install --upgrade -e . -r dev_requirements.txt twine python-ldap python-pam
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136
echo "Cleanup and update copyrights ... and clean checkout"
Mads Kiilerich
make-release: cleanup and fix bitrot...
r7116 scripts/run-all-cleanup
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 scripts/update-copyrights.py
hg up -cr .
Mads Kiilerich
release: add scripts/make-release for automation of the release process
r5507
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 echo "Make release build from clean checkout in build/"
rm -rf build dist
hg archive build
cd build
Mads Kiilerich
make-release: drop partial support for shipping the generated style.css and corresponding bootstrap
r7378 echo "Check that each entry in MANIFEST.in match something"
sed -e 's/[^ ]*[ ]*\([^ ]*\).*/\1/g' MANIFEST.in | xargs ls -lad
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136
echo "Build dist"
Mads Kiilerich
py3: switch to use Python 3 interpreter, temporarily leaving many things very broken until they have been migrated/fixed in a reviewable way...
r8053 python3 setup.py compile_catalog
python3 setup.py sdist
Mads Kiilerich
release: add scripts/make-release for automation of the release process
r5507
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 echo "Verify VERSION from kallithea/__init__.py"
Mads Kiilerich
release: add scripts/make-release for automation of the release process
r5507 namerel=$(cd dist && echo Kallithea-*.tar.gz)
namerel=${namerel%.tar.gz}
version=${namerel#Kallithea-}
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 ls -l $(pwd)/dist/$namerel.tar.gz
Mads Kiilerich
release: add scripts/make-release for automation of the release process
r5507 echo "Releasing Kallithea $version in directory $namerel"
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 echo "Verify dist file content"
Thomas De Schampheleire
scripts/make-release: fix check of dist file content after commit 7c7d6b5c07c7...
r8014 diff -u <((hg mani | grep -v '^\.hg\|^kallithea/i18n/en/LC_MESSAGES/kallithea.mo$') | 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)
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136
echo "Verify docs build"
Mads Kiilerich
py3: switch to use Python 3 interpreter, temporarily leaving many things very broken until they have been migrated/fixed in a reviewable way...
r8053 python3 setup.py build_sphinx # the results are not actually used, but we want to make sure it builds
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136
Thomas De Schampheleire
scripts/make-release: print out shortlog for inclusion in release announcements...
r7500 echo "Shortlog for inclusion in the release announcement"
scripts/shortlog.py "only('.', branch('stable') & tagged() & public() & not '.')"
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 cat - << EOT
Mads Kiilerich
release: add scripts/make-release for automation of the release process
r5507
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 Now, make sure
* all tests are passing
* release note is ready
* announcement is ready
* source has been pushed to https://kallithea-scm.org/repos/kallithea
Mads Kiilerich
release: add scripts/make-release for automation of the release process
r5507
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 EOT
Mads Kiilerich
release: add scripts/make-release for automation of the release process
r5507
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 echo "Verify current revision is tagged for $version"
hg log -r "'$version'&." | grep .
Mads Kiilerich
release: add scripts/make-release for automation of the release process
r5507
echo -n "Enter \"pypi\" to upload Kallithea $version to pypi: "
read answer
[ "$answer" = "pypi" ]
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 echo "Rebuild readthedocs for docs.kallithea-scm.org"
Mads Kiilerich
release: add scripts/make-release for automation of the release process
r5507 xdg-open https://readthedocs.org/projects/kallithea/
curl -X POST http://readthedocs.org/build/kallithea
Thomas De Schampheleire
scripts/make-release: update URL of read-the-docs Builds page...
r8029 xdg-open https://readthedocs.org/projects/kallithea/builds
Mads Kiilerich
docs: clean up readthedocs URLs...
r8355 xdg-open https://docs.kallithea-scm.org/en/latest/ # or whatever the branch is
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136
Thomas De Schampheleire
scripts/make-release: fix PyPI upload by using twine...
r7499 twine upload dist/*
Thomas De Schampheleire
make-release: import version and copyright updates from default branch (dba4e770d4b6)...
r7136 xdg-open https://pypi.python.org/pypi/Kallithea