1 | | = About CKAN Releases = |
2 | | |
3 | | The OKF aims to make releases CKAN regularly - minor points every two months. Find releases at: [http://pypi.python.org/pypi/ckan PyPI]. See the changes at on the [http://knowledgeforge.net/ckan/doc/ckan/CHANGELOG.html Changelog]. |
4 | | |
5 | | See also: VersioningPolicy |
6 | | |
7 | | = Branching for CKAN release - beta release = |
8 | | |
9 | | Branch and release a 'beta' when you have new features you want to burn in. We normally try out a beta release on ckan.net for a week before it is released properly. |
10 | | |
11 | | 1. Run the most thorough tests on the code. |
12 | | 1. Create the branch for the new version, named without the beta letter and according to the branch naming policy http://wiki.ckan.net/Mercurial : |
13 | | {{{ |
14 | | $ hg branch release-v1.2 |
15 | | }}} |
16 | | 1. Change the version number to the new version, but 'beta' in ckan/__init__.py e.g. 1.2b (this will show-up in the web interface, bottom-right corner.) |
17 | | 1. Change the pip-requirements.txt to refer to the new branch (buildbot will fail if you forget): |
18 | | {{{ |
19 | | -e hg+https://bitbucket.org/okfn/[email protected]#egg=ckan |
20 | | # CKAN dependencies |
21 | | -r https://bitbucket.org/okfn/ckan/raw/release-v1.2/requires/lucid_conflict.txt |
22 | | -r https://bitbucket.org/okfn/ckan/raw/release-v1.2/requires/lucid_present.txt |
23 | | -r https://bitbucket.org/okfn/ckan/raw/release-v1.2/requires/lucid_missing.txt |
24 | | }}} |
25 | | 1. Commit these changes: |
26 | | {{{ |
27 | | $ hg ci -m '[release]: branch.' |
28 | | }}} |
29 | | 1. Get merge to default right with new version number: |
30 | | {{{ |
31 | | $ hg up default |
32 | | $ hg merge -r release-v1.2 |
33 | | }}} |
34 | | Edit ckan/__init__.py with incremented number but alpha: e.g. 1.2a |
35 | | And edit pip-requirements.txt to use default branch not the release branch. |
36 | | 1. Commit the change and push everything: |
37 | | {{{ |
38 | | $ hg ci -m '[merge,release]: Merge from release branch and increment version number in anticipation of next version.' |
39 | | $ hg push |
40 | | }}} |
41 | | |
42 | | = Doing a proper CKAN release = |
43 | | |
44 | | Once the beta has been tested manually on a live instance for a week you can do a release. |
45 | | |
46 | | 1. Run the most thorough tests. |
47 | | 1. Summarise the tickets going in this release in the ckan/doc/CHANGELOG.rst |
48 | | 1. Remove the beta letter in the version number in ckan/__init__.py e.g. 1.1b -> 1.1 |
49 | | 1. Commit this change. |
50 | | 1. Update the internationalization POT file and commit it: |
51 | | {{{ |
52 | | $ python setup.py extract_messages |
53 | | $ hg ci -m '[i18n]: Updated POT ready for release.' ckan/i18n/ckan.pot |
54 | | }}} |
55 | | 1. Compile the docs: |
56 | | {{{ |
57 | | $ python setup.py build_sphinx |
58 | | }}} |
59 | | 1. Upload docs to docs.ckan.org: |
60 | | {{{ |
61 | | $ rsync build/sphinx/html/*.html [email protected]:/home/okfn/var/srvc/docs.ckan.org/ |
62 | | }}} |
63 | | Check it is displayed at: http://docs.ckan.org/ |
64 | | 1. Tag the repo with the version number (commits change). (add -f to the tag if you want to overwrite a previous tag with this release) e.g. |
65 | | {{{ |
66 | | $ hg tag ckan-1.1 -m 'Release 1.1' |
67 | | $ hg push |
68 | | }}} |
69 | | 1. Upload the release to PyPI (If you make a mistake, you can always go into http://pypi.python.org/pypi/ckan to remove the release file and then reupload it.) |
70 | | {{{ |
71 | | python setup.py sdist upload |
72 | | }}} |
73 | | 1. Close branch and merge to default: |
74 | | {{{ |
75 | | $ hg ci -m '[branch] close.' --close-branch |
76 | | $ hg up default |
77 | | $ hg merge -r release-v1.3.2 |
78 | | $ hg revert ckan/__init__.py pip-requirements.txt |
79 | | $ nosetests --ckan ckan/tests |
80 | | $ hg ci -m '[merge] from release-v1.3.2.' |
81 | | $ hg push |
82 | | }}} |
83 | | 1. If there have been any unreleased changes to OKF dependencies like vdm, ckanclient, datautil etc. make sure you release them too. |
84 | | |
85 | | 1. Write a [http://ckan.org/wp-admin CKAN Blog post] and email to ckan-discuss about the release, including the bit of changelog. |
86 | | |
87 | | = ckanclient releases = |
88 | | |
89 | | 1. Increase version number in ckanclient/__init__.py |
90 | | 1. Add a changelog for this new version in ckanclient/__init__.py |
91 | | 1. Check-in the changes |
92 | | 1. Tag the version: |
93 | | {{{ |
94 | | $ hg tag "ckanclient-v0.5" |
95 | | }}} |
96 | | 1. Create a PYPI config file (~/.pypirc) if necessary: |
97 | | {{{ |
98 | | [distutils] |
99 | | index-servers = |
100 | | pypi |
101 | | |
102 | | [pypi] |
103 | | #repository: http://www.python.org/pypi |
104 | | username: joebloggs |
105 | | password: mypassword |
106 | | }}} |
107 | | 1. Produce the distribution and upload to PYPI |
108 | | {{{ |
109 | | $ python setup.py sdist upload |
110 | | }}} |
111 | | 1. See the upload here: [[http://www.python.org/pypi/ckanclient]] |
112 | | 1. Check that the setup.py for various branches of CKAN have the new version in their range (as appropriate). |
113 | | 1. Check that the various pip-requirements.txt files also match the new version (as appropriate). |
114 | | |
115 | | = vdm releases = |
116 | | |
117 | | 1. Increase version number in vdm/__init__.py |
118 | | 1. Add a changelog for this new version in vdm/CHANGELOG.txt |
119 | | 1. Check-in the changes |
120 | | 1. Tag the version: |
121 | | {{{ |
122 | | $ hg tag "vdm-0.8" |
123 | | }}} |
124 | | 1. Create a PYPI config file (~/.pypirc) if necessary: |
125 | | {{{ |
126 | | [distutils] |
127 | | index-servers = |
128 | | pypi |
129 | | |
130 | | [pypi] |
131 | | #repository: http://www.python.org/pypi |
132 | | username: joebloggs |
133 | | password: mypassword |
134 | | }}} |
135 | | 1. Produce the distribution and upload to PYPI |
136 | | {{{ |
137 | | $ python setup.py sdist upload |
138 | | }}} |
139 | | 1. See the upload here: [[http://www.python.org/pypi/vdm]] |
140 | | 1. Check that the setup.py for various branches of CKAN have the new version in their range (as appropriate). |
141 | | 1. Check that the various pip-requirements.txt files also match the new version (as appropriate). |
| 1 | Moved to [http://wiki.ckan.net/Release_process] |