Show More
@@ -1,320 +1,305 | |||
|
1 | 1 | .. _core_developer_guide: |
|
2 | 2 | |
|
3 | 3 | ================================= |
|
4 | 4 | Guide for IPython core Developers |
|
5 | 5 | ================================= |
|
6 | 6 | |
|
7 | 7 | This guide documents the development of IPython itself. Alternatively, |
|
8 | 8 | developers of third party tools and libraries that use IPython should see the |
|
9 | 9 | :doc:`../development/index`. |
|
10 | 10 | |
|
11 | 11 | |
|
12 | 12 | For instructions on how to make a developer install see :ref:`devinstall`. |
|
13 | 13 | |
|
14 | 14 | Backporting Pull requests |
|
15 | 15 | ========================= |
|
16 | 16 | |
|
17 | 17 | All pull requests should usually be made against ``main``, if a Pull Request |
|
18 | 18 | need to be backported to an earlier release; then it should be tagged with the |
|
19 | 19 | correct ``milestone``. |
|
20 | 20 | |
|
21 | 21 | If you tag a pull request with a milestone **before** merging the pull request, |
|
22 | 22 | and the base ref is ``main``, then our backport bot should automatically create |
|
23 | 23 | a corresponding pull-request that backport on the correct branch. |
|
24 | 24 | |
|
25 | 25 | If you have write access to the IPython repository you can also just mention the |
|
26 | 26 | **backport bot** to do the work for you. The bot is evolving so instructions may |
|
27 | 27 | be different. At the time of this writing you can use:: |
|
28 | 28 | |
|
29 | 29 | @meeseeksdev[bot] backport [to] <branchname> |
|
30 | 30 | |
|
31 | 31 | The bot will attempt to backport the current pull-request and issue a PR if |
|
32 | 32 | possible. |
|
33 | 33 | |
|
34 | 34 | .. note:: |
|
35 | 35 | |
|
36 | 36 | The ``@`` and ``[bot]`` when mentioning the bot should be optional and can |
|
37 | 37 | be omitted. |
|
38 | 38 | |
|
39 | 39 | If the pull request cannot be automatically backported, the bot should tell you |
|
40 | 40 | so on the PR and apply a "Need manual backport" tag to the origin PR. |
|
41 | 41 | |
|
42 | 42 | .. _release_process: |
|
43 | 43 | |
|
44 | 44 | IPython release process |
|
45 | 45 | ======================= |
|
46 | 46 | |
|
47 | 47 | This document contains the process that is used to create an IPython release. |
|
48 | 48 | |
|
49 | 49 | Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython`` |
|
50 | 50 | repository automates most of the release process. This document serves as a |
|
51 | 51 | handy reminder and checklist for the release manager. |
|
52 | 52 | |
|
53 | 53 | During the release process, you might need the extra following dependencies: |
|
54 | 54 | |
|
55 | 55 | - ``keyring`` to access your GitHub authentication tokens |
|
56 | 56 | - ``graphviz`` to generate some graphs in the documentation |
|
57 | 57 | - ``ghpro`` to generate the stats |
|
58 | 58 | |
|
59 | 59 | Make sure you have all the required dependencies to run the tests as well. |
|
60 | 60 | |
|
61 | 61 | You can try to ``source tools/release_helper.sh`` when releasing via bash, it |
|
62 | 62 | should guide you through most of the process. |
|
63 | 63 | |
|
64 | 64 | |
|
65 | 65 | 1. Set Environment variables |
|
66 | 66 | ---------------------------- |
|
67 | 67 | |
|
68 | 68 | Set environment variables to document previous release tag, current |
|
69 | 69 | release milestone, current release version, and git tag. |
|
70 | 70 | |
|
71 | 71 | These variables may be used later to copy/paste as answers to the script |
|
72 | 72 | questions instead of typing the appropriate command when the time comes. These |
|
73 | 73 | variables are not used by the scripts directly; therefore, there is no need to |
|
74 | 74 | ``export`` them. The format for bash is as follows, but note that these values |
|
75 | 75 | are just an example valid only for the 5.0 release; you'll need to update them |
|
76 | 76 | for the release you are actually making:: |
|
77 | 77 | |
|
78 | 78 | PREV_RELEASE=4.2.1 |
|
79 | 79 | MILESTONE=5.0 |
|
80 | 80 | VERSION=5.0.0 |
|
81 | 81 | BRANCH=main |
|
82 | 82 | |
|
83 | 83 | For `reproducibility of builds <https://reproducible-builds.org/specs/source-date-epoch/>`_, |
|
84 | 84 | we recommend setting ``SOURCE_DATE_EPOCH`` prior to running the build; record the used value |
|
85 | 85 | of ``SOURCE_DATE_EPOCH`` as it may not be available from build artifact. You |
|
86 | 86 | should be able to use ``date +%s`` to get a formatted timestamp:: |
|
87 | 87 | |
|
88 | 88 | SOURCE_DATE_EPOCH=$(date +%s) |
|
89 | 89 | |
|
90 | 90 | |
|
91 | 91 | 2. Create GitHub stats and finish release note |
|
92 | 92 | ---------------------------------------------- |
|
93 | 93 | |
|
94 | 94 | .. note:: |
|
95 | 95 | |
|
96 | 96 | This step is optional if making a Beta or RC release. |
|
97 | 97 | |
|
98 | 98 | .. note:: |
|
99 | 99 | |
|
100 | 100 | Before generating the GitHub stats, verify that all closed issues and pull |
|
101 | 101 | requests have `appropriate milestones |
|
102 | 102 | <https://github.com/ipython/ipython/wiki/Dev:-GitHub-workflow#milestones>`_. |
|
103 | 103 | `This search |
|
104 | 104 | <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_ |
|
105 | 105 | should return no results before creating the GitHub stats. |
|
106 | 106 | |
|
107 | 107 | If a major release: |
|
108 | 108 | |
|
109 | 109 | - merge any pull request notes into what's new:: |
|
110 | 110 | |
|
111 | 111 | python tools/update_whatsnew.py |
|
112 | 112 | |
|
113 | 113 | - update ``docs/source/whatsnew/development.rst``, to ensure it covers |
|
114 | 114 | the major release features |
|
115 | 115 | |
|
116 | 116 | - move the contents of ``development.rst`` to ``versionX.rst`` where ``X`` is |
|
117 | 117 | the numerical release version |
|
118 | 118 | |
|
119 | - generate summary of GitHub contributions, which can be done with:: | |
|
120 | ||
|
121 | python tools/github_stats.py --milestone $MILESTONE > stats.rst | |
|
122 | ||
|
123 | which may need some manual cleanup of ``stats.rst``. Add the cleaned | |
|
124 | ``stats.rst`` results to ``docs/source/whatsnew/github-stats-X.rst`` | |
|
125 | where ``X`` is the numerical release version (don't forget to add it to | |
|
126 | the git repository as well). If creating a major release, make a new | |
|
127 | ``github-stats-X.rst`` file; if creating a minor release, the content | |
|
128 | from ``stats.rst`` may simply be added to the top of an existing | |
|
129 | ``github-stats-X.rst`` file. | |
|
130 | ||
|
131 | - Edit ``docs/source/whatsnew/index.rst`` to list the new ``github-stats-X`` | |
|
132 | file you just created. | |
|
133 | ||
|
134 | 119 | - You do not need to temporarily remove the first entry called |
|
135 | 120 | ``development``, nor re-add it after the release, it will automatically be |
|
136 | 121 | hidden when releasing a stable version of IPython (if ``_version_extra`` |
|
137 | 122 | in ``release.py`` is an empty string. |
|
138 | 123 | |
|
139 | 124 | Make sure that the stats file has a header or it won't be rendered in |
|
140 | 125 | the final documentation. |
|
141 | 126 | |
|
142 | 127 | To find duplicates and update `.mailmap`, use:: |
|
143 | 128 | |
|
144 | 129 | git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f |
|
145 | 130 | |
|
146 | 131 | If a minor release you might need to do some of the above points manually, and |
|
147 | 132 | forward port the changes. |
|
148 | 133 | |
|
149 | 134 | 3. Make sure the repository is clean |
|
150 | 135 | ------------------------------------ |
|
151 | 136 | |
|
152 | 137 | of any file that could be problematic. |
|
153 | 138 | Remove all non-tracked files with: |
|
154 | 139 | |
|
155 | 140 | .. code:: |
|
156 | 141 | |
|
157 | 142 | git clean -xfdi |
|
158 | 143 | |
|
159 | 144 | This will ask for confirmation before removing all untracked files. Make |
|
160 | 145 | sure the ``dist/`` folder is clean to avoid any stale builds from |
|
161 | 146 | previous build attempts. |
|
162 | 147 | |
|
163 | 148 | |
|
164 | 149 | 4. Update the release version number |
|
165 | 150 | ------------------------------------ |
|
166 | 151 | |
|
167 | 152 | Edit ``IPython/core/release.py`` to have the current version. |
|
168 | 153 | |
|
169 | 154 | in particular, update version number and ``_version_extra`` content in |
|
170 | 155 | ``IPython/core/release.py``. |
|
171 | 156 | |
|
172 | 157 | Step 5 will validate your changes automatically, but you might still want to |
|
173 | 158 | make sure the version number matches pep440. |
|
174 | 159 | |
|
175 | 160 | In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist`` |
|
176 | 161 | and ``bdist`` will appear as different releases. For example, a valid version |
|
177 | 162 | number for a release candidate (rc) release is: ``1.3rc1``. Notice that there |
|
178 | 163 | is no separator between the '3' and the 'r'. Check the environment variable |
|
179 | 164 | ``$VERSION`` as well. |
|
180 | 165 | |
|
181 | 166 | You will likely just have to modify/comment/uncomment one of the lines setting |
|
182 | 167 | ``_version_extra`` |
|
183 | 168 | |
|
184 | 169 | |
|
185 | 170 | 5. Run the `tools/build_release` script |
|
186 | 171 | --------------------------------------- |
|
187 | 172 | |
|
188 | 173 | Running ``tools/build_release`` does all the file checking and building that |
|
189 | 174 | the real release script will do. This makes test installations, checks that |
|
190 | 175 | the build procedure runs OK, and tests other steps in the release process. |
|
191 | 176 | |
|
192 | 177 | The ``build_release`` script will in particular verify that the version number |
|
193 | 178 | match PEP 440, in order to avoid surprise at the time of build upload. |
|
194 | 179 | |
|
195 | 180 | We encourage creating a test build of the docs as well. |
|
196 | 181 | |
|
197 | 182 | 6. Create and push the new tag |
|
198 | 183 | ------------------------------ |
|
199 | 184 | |
|
200 | 185 | Commit the changes to release.py:: |
|
201 | 186 | |
|
202 | 187 | git commit -am "release $VERSION" -S |
|
203 | 188 | git push origin $BRANCH |
|
204 | 189 | |
|
205 | 190 | (omit the ``-S`` if you are no signing the package) |
|
206 | 191 | |
|
207 | 192 | Create and push the tag:: |
|
208 | 193 | |
|
209 | 194 | git tag -am "release $VERSION" "$VERSION" -s |
|
210 | 195 | git push origin $VERSION |
|
211 | 196 | |
|
212 | 197 | (omit the ``-s`` if you are no signing the package) |
|
213 | 198 | |
|
214 | 199 | Update release.py back to ``x.y-dev`` or ``x.y-maint`` commit and push:: |
|
215 | 200 | |
|
216 | 201 | git commit -am "back to development" -S |
|
217 | 202 | git push origin $BRANCH |
|
218 | 203 | |
|
219 | 204 | (omit the ``-S`` if you are no signing the package) |
|
220 | 205 | |
|
221 | 206 | Now checkout the tag we just made:: |
|
222 | 207 | |
|
223 | 208 | git checkout $VERSION |
|
224 | 209 | |
|
225 | 210 | 7. Run the release script |
|
226 | 211 | ------------------------- |
|
227 | 212 | |
|
228 | 213 | Run the ``release`` script, this step requires having a current wheel, Python |
|
229 | 214 | >=3.4 and Python 2.7.:: |
|
230 | 215 | |
|
231 | 216 | ./tools/release |
|
232 | 217 | |
|
233 | 218 | This makes the tarballs and wheels, and puts them under the ``dist/`` |
|
234 | 219 | folder. Be sure to test the ``wheels`` and the ``sdist`` locally before |
|
235 | 220 | uploading them to PyPI. We do not use an universal wheel as each wheel |
|
236 | 221 | installs an ``ipython2`` or ``ipython3`` script, depending on the version of |
|
237 | 222 | Python it is built for. Using an universal wheel would prevent this. |
|
238 | 223 | |
|
239 | 224 | Check the shasum of files with:: |
|
240 | 225 | |
|
241 | 226 | shasum -a 256 dist/* |
|
242 | 227 | |
|
243 | 228 | and takes notes of them you might need them to update the conda-forge recipes. |
|
244 | 229 | Rerun the command and check the hash have not changed:: |
|
245 | 230 | |
|
246 | 231 | ./tools/release |
|
247 | 232 | shasum -a 256 dist/* |
|
248 | 233 | |
|
249 | 234 | Use the following to actually upload the result of the build:: |
|
250 | 235 | |
|
251 | 236 | ./tools/release upload |
|
252 | 237 | |
|
253 | 238 | It should posts them to ``archive.ipython.org`` and to PyPI. |
|
254 | 239 | |
|
255 | 240 | PyPI/Warehouse will automatically hide previous releases. If you are uploading |
|
256 | 241 | a non-stable version, make sure to log-in to PyPI and un-hide previous version. |
|
257 | 242 | |
|
258 | 243 | |
|
259 | 244 | 8. Draft a short release announcement |
|
260 | 245 | ------------------------------------- |
|
261 | 246 | |
|
262 | 247 | The announcement should include: |
|
263 | 248 | |
|
264 | 249 | - release highlights |
|
265 | 250 | - a link to the html version of the *What's new* section of the documentation |
|
266 | 251 | - a link to upgrade or installation tips (if necessary) |
|
267 | 252 | |
|
268 | 253 | Post the announcement to the mailing list and or blog, and link from Twitter. |
|
269 | 254 | |
|
270 | 255 | .. note:: |
|
271 | 256 | |
|
272 | 257 | If you are doing a RC or Beta, you can likely skip the next steps. |
|
273 | 258 | |
|
274 | 259 | 9. Update milestones on GitHub |
|
275 | 260 | ------------------------------- |
|
276 | 261 | |
|
277 | 262 | These steps will bring milestones up to date: |
|
278 | 263 | |
|
279 | 264 | - close the just released milestone |
|
280 | 265 | - open a new milestone for the next release (x, y+1), if the milestone doesn't |
|
281 | 266 | exist already |
|
282 | 267 | |
|
283 | 268 | 10. Update the IPython website |
|
284 | 269 | ------------------------------ |
|
285 | 270 | |
|
286 | 271 | The IPython website should document the new release: |
|
287 | 272 | |
|
288 | 273 | - add release announcement (news, announcements) |
|
289 | 274 | - update current version and download links |
|
290 | 275 | - update links on the documentation page (especially if a major release) |
|
291 | 276 | |
|
292 | 277 | 11. Update readthedocs |
|
293 | 278 | ---------------------- |
|
294 | 279 | |
|
295 | 280 | Make sure to update readthedocs and set the latest tag as stable, as well as |
|
296 | 281 | checking that previous release is still building under its own tag. |
|
297 | 282 | |
|
298 | 283 | 12. Update the Conda-Forge feedstock |
|
299 | 284 | ------------------------------------ |
|
300 | 285 | |
|
301 | 286 | Follow the instructions on `the repository <https://github.com/conda-forge/ipython-feedstock>`_ |
|
302 | 287 | |
|
303 | 288 | 13. Celebrate! |
|
304 | 289 | -------------- |
|
305 | 290 | |
|
306 | 291 | Celebrate the release and please thank the contributors for their work. Great |
|
307 | 292 | job! |
|
308 | 293 | |
|
309 | 294 | |
|
310 | 295 | |
|
311 | 296 | Old Documentation |
|
312 | 297 | ================= |
|
313 | 298 | |
|
314 | 299 | Out of date documentation is still available and have been kept for archival purposes. |
|
315 | 300 | |
|
316 | 301 | .. note:: |
|
317 | 302 | |
|
318 | 303 | Developers documentation used to be on the IPython wiki, but are now out of |
|
319 | 304 | date. The wiki is though still available for historical reasons: `Old IPython |
|
320 | 305 | GitHub Wiki. <https://github.com/ipython/ipython/wiki/Dev:-Index>`_ |
@@ -1,259 +1,237 | |||
|
1 | 1 | # Simple tool to help for release |
|
2 | 2 | # when releasing with bash, simple source it to get asked questions. |
|
3 | 3 | |
|
4 | 4 | # misc check before starting |
|
5 | 5 | BLACK=$(tput setaf 1) |
|
6 | 6 | RED=$(tput setaf 1) |
|
7 | 7 | GREEN=$(tput setaf 2) |
|
8 | 8 | YELLOW=$(tput setaf 3) |
|
9 | 9 | BLUE=$(tput setaf 4) |
|
10 | 10 | MAGENTA=$(tput setaf 5) |
|
11 | 11 | CYAN=$(tput setaf 6) |
|
12 | 12 | WHITE=$(tput setaf 7) |
|
13 | 13 | NOR=$(tput sgr0) |
|
14 | 14 | |
|
15 | 15 | |
|
16 | 16 | echo "Checking all tools are installed..." |
|
17 | 17 | |
|
18 | 18 | python -c 'import keyring' |
|
19 | 19 | python -c 'import twine' |
|
20 | 20 | python -c 'import sphinx' |
|
21 | 21 | python -c 'import sphinx_rtd_theme' |
|
22 | 22 | python -c 'import pytest' |
|
23 | 23 | python -c 'import build' |
|
24 | 24 | # those are necessary fo building the docs |
|
25 | 25 | echo "Checking imports for docs" |
|
26 | 26 | python -c 'import numpy' |
|
27 | 27 | python -c 'import matplotlib' |
|
28 | 28 | |
|
29 | 29 | |
|
30 | 30 | |
|
31 | 31 | |
|
32 | 32 | echo "Will use $BLUE'$EDITOR'$NOR to edit files when necessary" |
|
33 | 33 | # echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: " |
|
34 | 34 | # read input |
|
35 | 35 | # PREV_RELEASE=${input:-$PREV_RELEASE} |
|
36 | 36 | # echo -n "MILESTONE (X.y) [$MILESTONE]: " |
|
37 | 37 | # read input |
|
38 | 38 | # MILESTONE=${input:-$MILESTONE} |
|
39 | 39 | echo -n "VERSION (X.y.z) [$VERSION]:" |
|
40 | 40 | read input |
|
41 | 41 | VERSION=${input:-$VERSION} |
|
42 | 42 | echo -n "BRANCH (main|X.y) [$BRANCH]:" |
|
43 | 43 | read input |
|
44 | 44 | BRANCH=${input:-$BRANCH} |
|
45 | 45 | |
|
46 | 46 | ask_section(){ |
|
47 | 47 | echo |
|
48 | 48 | echo $BLUE"$1"$NOR |
|
49 | 49 | echo -n $GREEN"Press Enter to continue, S to skip: "$NOR |
|
50 | 50 | if [ "$ZSH_NAME" = "zsh" ] ; then |
|
51 | 51 | read -k1 value |
|
52 | 52 | value=${value%$'\n'} |
|
53 | 53 | else |
|
54 | 54 | read -n1 value |
|
55 | 55 | fi |
|
56 | 56 | if [ -z "$value" ] || [ $value = 'y' ]; then |
|
57 | 57 | return 0 |
|
58 | 58 | fi |
|
59 | 59 | return 1 |
|
60 | 60 | } |
|
61 | 61 | |
|
62 | 62 | |
|
63 | 63 | maybe_edit(){ |
|
64 | 64 | echo |
|
65 | 65 | echo $BLUE"$1"$NOR |
|
66 | 66 | echo -n $GREEN"Press ${BLUE}e$GREEN to Edit ${BLUE}$1$GREEN, any other keys to skip: "$NOR |
|
67 | 67 | if [ "$ZSH_NAME" = "zsh" ] ; then |
|
68 | 68 | read -k1 value |
|
69 | 69 | value=${value%$'\n'} |
|
70 | 70 | else |
|
71 | 71 | read -n1 value |
|
72 | 72 | fi |
|
73 | 73 | |
|
74 | 74 | echo |
|
75 | 75 | if [ $value = 'e' ] ; then |
|
76 | 76 | $=EDITOR $1 |
|
77 | 77 | fi |
|
78 | 78 | } |
|
79 | 79 | |
|
80 | 80 | |
|
81 | 81 | |
|
82 | 82 | echo |
|
83 | 83 | if ask_section "Updating what's new with information from docs/source/whatsnew/pr" |
|
84 | 84 | then |
|
85 | 85 | python tools/update_whatsnew.py |
|
86 | 86 | |
|
87 | 87 | echo |
|
88 | 88 | echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR |
|
89 | 89 | echo $GREEN"Press enter to continue"$NOR |
|
90 | 90 | read |
|
91 | 91 | fi |
|
92 | 92 | |
|
93 | # if ask_section "Gen Stats, and authors" | |
|
94 | # then | |
|
95 | # | |
|
96 | # echo | |
|
97 | # echo $BLUE"here are all the authors that contributed to this release:"$NOR | |
|
98 | # git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f | |
|
99 | # | |
|
100 | # echo | |
|
101 | # echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap." | |
|
102 | # echo $GREEN"Press enter to continue:"$NOR | |
|
103 | # read | |
|
104 | # | |
|
105 | # echo $BLUE"generating stats"$NOR | |
|
106 | # python tools/github_stats.py --milestone $MILESTONE > stats.rst | |
|
107 | # | |
|
108 | # echo $BLUE"stats.rst files generated."$NOR | |
|
109 | # echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR | |
|
110 | # echo $GREEN"press enter to continue."$NOR | |
|
111 | # read | |
|
112 | # | |
|
113 | # fi | |
|
114 | ||
|
115 | 93 | # if ask_section "Generate API difference (using frapuccino)" |
|
116 | 94 | # then |
|
117 | 95 | # echo $BLUE"Checking out $PREV_RELEASE"$NOR |
|
118 | 96 | # git checkout tags/$PREV_RELEASE |
|
119 | 97 | # sleep 1 |
|
120 | 98 | # echo $BLUE"Saving API to file $PREV_RELEASE"$NOR |
|
121 | 99 | # frappuccino IPython IPython.kernel IPython.lib IPython.qt IPython.lib.kernel IPython.html IPython.frontend IPython.external --save IPython-$PREV_RELEASE.json |
|
122 | 100 | # echo $BLUE"coming back to $BRANCH"$NOR |
|
123 | 101 | # git switch $BRANCH |
|
124 | 102 | # sleep 1 |
|
125 | 103 | # echo $BLUE"comparing ..."$NOR |
|
126 | 104 | # frappuccino IPython IPython.kernel IPython.lib --compare IPython-$PREV_RELEASE.json |
|
127 | 105 | # echo $GREEN"Use the above guideline to write an API changelog ..."$NOR |
|
128 | 106 | # echo $GREEN"Press any keys to continue"$NOR |
|
129 | 107 | # read |
|
130 | 108 | # fi |
|
131 | 109 | |
|
132 | 110 | echo "Cleaning repository" |
|
133 | 111 | git clean -xfdi |
|
134 | 112 | |
|
135 | 113 | echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet – we'll do it later."$NOR |
|
136 | 114 | echo $GREEN"I tried ${RED}sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py${NOR}" |
|
137 | 115 | sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py |
|
138 | 116 | rm IPython/core/release.pybkp |
|
139 | 117 | git diff | cat |
|
140 | 118 | maybe_edit IPython/core/release.py |
|
141 | 119 | |
|
142 | 120 | echo $GREEN"Press enter to continue"$NOR |
|
143 | 121 | read |
|
144 | 122 | |
|
145 | 123 | if ask_section "Build the documentation ?" |
|
146 | 124 | then |
|
147 | 125 | make html -C docs |
|
148 | 126 | echo |
|
149 | 127 | echo $GREEN"Check the docs, press enter to continue"$NOR |
|
150 | 128 | read |
|
151 | 129 | |
|
152 | 130 | fi |
|
153 | 131 | |
|
154 | 132 | if ask_section "Should we commit, tag, push... etc ? " |
|
155 | 133 | then |
|
156 | 134 | echo |
|
157 | 135 | echo $BLUE"Let's commit : git commit -am \"release $VERSION\" -S" |
|
158 | 136 | echo $GREEN"Press enter to commit"$NOR |
|
159 | 137 | read |
|
160 | 138 | git commit -am "release $VERSION" -S |
|
161 | 139 | |
|
162 | 140 | echo |
|
163 | 141 | echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR |
|
164 | 142 | echo $GREEN"Make sure you can push"$NOR |
|
165 | 143 | echo $GREEN"Press enter to continue"$NOR |
|
166 | 144 | read |
|
167 | 145 | git push origin $BRANCH |
|
168 | 146 | |
|
169 | 147 | echo |
|
170 | 148 | echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s" |
|
171 | 149 | echo $GREEN"Press enter to tag commit"$NOR |
|
172 | 150 | read |
|
173 | 151 | git tag -am "release $VERSION" "$VERSION" -s |
|
174 | 152 | |
|
175 | 153 | echo |
|
176 | 154 | echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR |
|
177 | 155 | echo $GREEN"Press enter to continue"$NOR |
|
178 | 156 | read |
|
179 | 157 | git push origin $VERSION |
|
180 | 158 | |
|
181 | 159 | |
|
182 | 160 | echo $GREEN"please update version number and back to .dev in ${RED}IPython/core/release.py" |
|
183 | 161 | echo $GREEN"I tried ${RED}sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py${NOR}" |
|
184 | 162 | sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py |
|
185 | 163 | rm IPython/core/release.pybkp |
|
186 | 164 | git diff | cat |
|
187 | 165 | echo $GREEN"Please bump ${RED}the minor version number${NOR}" |
|
188 | 166 | maybe_edit IPython/core/release.py |
|
189 | 167 | echo ${BLUE}"Do not commit yet – we'll do it later."$NOR |
|
190 | 168 | |
|
191 | 169 | |
|
192 | 170 | echo $GREEN"Press enter to continue"$NOR |
|
193 | 171 | read |
|
194 | 172 | |
|
195 | 173 | echo |
|
196 | 174 | echo "Let's commit : "$BLUE"git commit -am \"back to dev\""$NOR |
|
197 | 175 | echo $GREEN"Press enter to commit"$NOR |
|
198 | 176 | read |
|
199 | 177 | git commit -am "back to dev" |
|
200 | 178 | |
|
201 | 179 | echo |
|
202 | 180 | echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR |
|
203 | 181 | echo $GREEN"Press enter to continue"$NOR |
|
204 | 182 | read |
|
205 | 183 | git push origin $BRANCH |
|
206 | 184 | |
|
207 | 185 | |
|
208 | 186 | echo |
|
209 | 187 | echo $BLUE"let's : git checkout tags/$VERSION"$NOR |
|
210 | 188 | echo $GREEN"Press enter to continue"$NOR |
|
211 | 189 | read |
|
212 | 190 | git checkout tags/$VERSION |
|
213 | 191 | fi |
|
214 | 192 | |
|
215 | 193 | if ask_section "Should we build and release ?" |
|
216 | 194 | then |
|
217 | 195 | |
|
218 | 196 | echo $BLUE"going to set SOURCE_DATE_EPOCH"$NOR |
|
219 | 197 | echo $BLUE'export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)'$NOR |
|
220 | 198 | echo $GREEN"Press enter to continue"$NOR |
|
221 | 199 | read |
|
222 | 200 | |
|
223 | 201 | export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD) |
|
224 | 202 | |
|
225 | 203 | echo $BLUE"SOURCE_DATE_EPOCH set to $SOURCE_DATE_EPOCH"$NOR |
|
226 | 204 | echo $GREEN"Press enter to continue"$NOR |
|
227 | 205 | read |
|
228 | 206 | |
|
229 | 207 | |
|
230 | 208 | |
|
231 | 209 | echo |
|
232 | 210 | echo $BLUE"Attempting to build package..."$NOR |
|
233 | 211 | |
|
234 | 212 | tools/build_release |
|
235 | 213 | |
|
236 | 214 | |
|
237 | 215 | echo $RED'$ shasum -a 256 dist/*' |
|
238 | 216 | shasum -a 256 dist/* |
|
239 | 217 | echo $NOR |
|
240 | 218 | |
|
241 | 219 | echo $BLUE"We are going to rebuild, node the hash above, and compare them to the rebuild"$NOR |
|
242 | 220 | echo $GREEN"Press enter to continue"$NOR |
|
243 | 221 | read |
|
244 | 222 | |
|
245 | 223 | echo |
|
246 | 224 | echo $BLUE"Attempting to build package..."$NOR |
|
247 | 225 | |
|
248 | 226 | tools/build_release |
|
249 | 227 | |
|
250 | 228 | echo $RED"Check the shasum for SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH" |
|
251 | 229 | echo $RED'$ shasum -a 256 dist/*' |
|
252 | 230 | shasum -a 256 dist/* |
|
253 | 231 | echo $NOR |
|
254 | 232 | |
|
255 | 233 | if ask_section "upload packages ?" |
|
256 | 234 | then |
|
257 | 235 | twine upload --verbose dist/*.tar.gz dist/*.whl |
|
258 | 236 | fi |
|
259 | 237 | fi |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed, binary diff hidden |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now