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