##// END OF EJS Templates
scripts/make-release: install ldap and pam to fix isort instabilities...
Thomas De Schampheleire -
r7867:22321950 stable
parent child Browse files
Show More
@@ -1,81 +1,81 b''
1 #!/bin/bash
1 #!/bin/bash
2 set -e
2 set -e
3 set -x
3 set -x
4
4
5 cleanup()
5 cleanup()
6 {
6 {
7 echo "Removing venv $venv"
7 echo "Removing venv $venv"
8 rm -rf "$venv"
8 rm -rf "$venv"
9 }
9 }
10
10
11 echo "Checking that you are NOT inside a virtualenv"
11 echo "Checking that you are NOT inside a virtualenv"
12 [ -z "$VIRTUAL_ENV" ]
12 [ -z "$VIRTUAL_ENV" ]
13
13
14 venv=$(mktemp -d --tmpdir kallithea-release-XXXXX)
14 venv=$(mktemp -d --tmpdir kallithea-release-XXXXX)
15 trap cleanup EXIT
15 trap cleanup EXIT
16
16
17 echo "Setting up a fresh virtualenv in $venv"
17 echo "Setting up a fresh virtualenv in $venv"
18 virtualenv -p python2 "$venv"
18 virtualenv -p python2 "$venv"
19 . "$venv/bin/activate"
19 . "$venv/bin/activate"
20
20
21 echo "Install/verify tools needed for building and uploading stuff"
21 echo "Install/verify tools needed for building and uploading stuff"
22 pip install --upgrade -e . -r dev_requirements.txt twine
22 pip install --upgrade -e . -r dev_requirements.txt twine python-ldap python-pam
23
23
24 echo "Cleanup and update copyrights ... and clean checkout"
24 echo "Cleanup and update copyrights ... and clean checkout"
25 scripts/run-all-cleanup
25 scripts/run-all-cleanup
26 scripts/update-copyrights.py
26 scripts/update-copyrights.py
27 hg up -cr .
27 hg up -cr .
28
28
29 echo "Make release build from clean checkout in build/"
29 echo "Make release build from clean checkout in build/"
30 rm -rf build dist
30 rm -rf build dist
31 hg archive build
31 hg archive build
32 cd build
32 cd build
33
33
34 echo "Check that each entry in MANIFEST.in match something"
34 echo "Check that each entry in MANIFEST.in match something"
35 sed -e 's/[^ ]*[ ]*\([^ ]*\).*/\1/g' MANIFEST.in | xargs ls -lad
35 sed -e 's/[^ ]*[ ]*\([^ ]*\).*/\1/g' MANIFEST.in | xargs ls -lad
36
36
37 echo "Build dist"
37 echo "Build dist"
38 python2 setup.py compile_catalog
38 python2 setup.py compile_catalog
39 python2 setup.py sdist
39 python2 setup.py sdist
40
40
41 echo "Verify VERSION from kallithea/__init__.py"
41 echo "Verify VERSION from kallithea/__init__.py"
42 namerel=$(cd dist && echo Kallithea-*.tar.gz)
42 namerel=$(cd dist && echo Kallithea-*.tar.gz)
43 namerel=${namerel%.tar.gz}
43 namerel=${namerel%.tar.gz}
44 version=${namerel#Kallithea-}
44 version=${namerel#Kallithea-}
45 ls -l $(pwd)/dist/$namerel.tar.gz
45 ls -l $(pwd)/dist/$namerel.tar.gz
46 echo "Releasing Kallithea $version in directory $namerel"
46 echo "Releasing Kallithea $version in directory $namerel"
47
47
48 echo "Verify dist file content"
48 echo "Verify dist file content"
49 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)
49 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)
50
50
51 echo "Verify docs build"
51 echo "Verify docs build"
52 python2 setup.py build_sphinx # the results are not actually used, but we want to make sure it builds
52 python2 setup.py build_sphinx # the results are not actually used, but we want to make sure it builds
53
53
54 echo "Shortlog for inclusion in the release announcement"
54 echo "Shortlog for inclusion in the release announcement"
55 scripts/shortlog.py "only('.', branch('stable') & tagged() & public() & not '.')"
55 scripts/shortlog.py "only('.', branch('stable') & tagged() & public() & not '.')"
56
56
57 cat - << EOT
57 cat - << EOT
58
58
59 Now, make sure
59 Now, make sure
60 * all tests are passing
60 * all tests are passing
61 * release note is ready
61 * release note is ready
62 * announcement is ready
62 * announcement is ready
63 * source has been pushed to https://kallithea-scm.org/repos/kallithea
63 * source has been pushed to https://kallithea-scm.org/repos/kallithea
64
64
65 EOT
65 EOT
66
66
67 echo "Verify current revision is tagged for $version"
67 echo "Verify current revision is tagged for $version"
68 hg log -r "'$version'&." | grep .
68 hg log -r "'$version'&." | grep .
69
69
70 echo -n "Enter \"pypi\" to upload Kallithea $version to pypi: "
70 echo -n "Enter \"pypi\" to upload Kallithea $version to pypi: "
71 read answer
71 read answer
72 [ "$answer" = "pypi" ]
72 [ "$answer" = "pypi" ]
73
73
74 echo "Rebuild readthedocs for docs.kallithea-scm.org"
74 echo "Rebuild readthedocs for docs.kallithea-scm.org"
75 xdg-open https://readthedocs.org/projects/kallithea/
75 xdg-open https://readthedocs.org/projects/kallithea/
76 curl -X POST http://readthedocs.org/build/kallithea
76 curl -X POST http://readthedocs.org/build/kallithea
77 xdg-open https://readthedocs.org/builds/kallithea/
77 xdg-open https://readthedocs.org/builds/kallithea/
78 xdg-open http://docs.kallithea-scm.org/en/latest/ # or whatever the branch is
78 xdg-open http://docs.kallithea-scm.org/en/latest/ # or whatever the branch is
79
79
80 twine upload dist/*
80 twine upload dist/*
81 xdg-open https://pypi.python.org/pypi/Kallithea
81 xdg-open https://pypi.python.org/pypi/Kallithea
General Comments 0
You need to be logged in to leave comments. Login now