Skip to content
forked from pydata/xarray

Commit 8d09879

Browse files
authored
Tweaks to release instructions (pydata#3555)
* tweaks to release instructions * Update HOW_TO_RELEASE.md Co-Authored-By: keewis <[email protected]> * no need for --reverse either * add cool script as option from @keewis * whatsnew reference * tweak
1 parent 6b70107 commit 8d09879

File tree

2 files changed

+41
-12
lines changed

2 files changed

+41
-12
lines changed

HOW_TO_RELEASE renamed to HOW_TO_RELEASE.md

+40-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
How to issue an xarray release in 15 easy steps
1+
How to issue an xarray release in 14 easy steps
22

33
Time required: about an hour.
44

55
1. Ensure your master branch is synced to upstream:
6-
git pull upstream master
6+
```
7+
git pull upstream master
8+
```
79
2. Look over whats-new.rst and the docs. Make sure "What's New" is complete
810
(check the date!) and consider adding a brief summary note describing the
911
release at the top.
@@ -12,37 +14,53 @@ Time required: about an hour.
1214
- Function/method references should include links to the API docs.
1315
- Sometimes notes get added in the wrong section of whats-new, typically
1416
due to a bad merge. Check for these before a release by using git diff,
15-
e.g., ``git diff v0.X.Y whats-new.rst`` where 0.X.Y is the previous
17+
e.g., `git diff v0.X.Y whats-new.rst` where 0.X.Y is the previous
1618
release.
1719
3. If you have any doubts, run the full test suite one final time!
18-
py.test
20+
```
21+
pytest
22+
```
1923
4. On the master branch, commit the release in git:
24+
```
2025
git commit -a -m 'Release v0.X.Y'
26+
```
2127
5. Tag the release:
28+
```
2229
git tag -a v0.X.Y -m 'v0.X.Y'
30+
```
2331
6. Build source and binary wheels for pypi:
32+
```
2433
git clean -xdf # this deletes all uncommited changes!
2534
python setup.py bdist_wheel sdist
35+
```
2636
7. Use twine to register and upload the release on pypi. Be careful, you can't
2737
take this back!
38+
```
2839
twine upload dist/xarray-0.X.Y*
40+
```
2941
You will need to be listed as a package owner at
3042
https://pypi.python.org/pypi/xarray for this to work.
3143
8. Push your changes to master:
44+
```
3245
git push upstream master
3346
git push upstream --tags
47+
```
3448
9. Update the stable branch (used by ReadTheDocs) and switch back to master:
49+
```
3550
git checkout stable
3651
git rebase master
3752
git push upstream stable
3853
git checkout master
39-
It's OK to force push to 'stable' if necessary.
40-
We also update the stable branch with `git cherrypick` for documentation
41-
only fixes that apply the current released version.
54+
```
55+
It's OK to force push to 'stable' if necessary. (We also update the stable
56+
branch with `git cherrypick` for documentation only fixes that apply the
57+
current released version.)
4258
10. Add a section for the next release (v.X.(Y+1)) to doc/whats-new.rst.
4359
11. Commit your changes and push to master again:
44-
git commit -a -m 'Revert to dev version'
60+
```
61+
git commit -a -m 'New whatsnew section'
4562
git push upstream master
63+
```
4664
You're done pushing to master!
4765
12. Issue the release on GitHub. Click on "Draft a new release" at
4866
https://github.com/pydata/xarray/releases. Type in the version number, but
@@ -53,11 +71,22 @@ Time required: about an hour.
5371
14. Issue the release announcement! For bug fix releases, I usually only email
5472
[email protected]. For major/feature releases, I will email a broader
5573
list (no more than once every 3-6 months):
56-
57-
58-
74+
75+
76+
77+
78+
79+
5980
Google search will turn up examples of prior release announcements (look for
6081
"ANN xarray").
82+
You can get a list of contributors with:
83+
```
84+
git log "$(git tag --sort="v:refname" | sed -n 'x;$p').." --format="%aN" | sort -u
85+
```
86+
or by replacing `v0.X.Y` with the _previous_ release in:
87+
```
88+
git log v0.X.Y.. --format="%aN" | sort -u
89+
```
6190
6291
Note on version numbering:
6392

doc/whats-new.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ What's New
1313
import xarray as xr
1414
np.random.seed(123456)
1515
16-
.. _whats-new.0.14.1:
16+
.. _whats-new.0.15.0:
1717

1818

1919
v0.15.0 (unreleased)

0 commit comments

Comments
 (0)