Skip to content

Commit cc4df34

Browse files
authored
Small updates to How-to-release + lint (#4436)
* Lint markdown * _ * _
1 parent 894b26e commit cc4df34

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

HOW_TO_RELEASE.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,34 @@
33
Time required: about an hour.
44

55
These instructions assume that `upstream` refers to the main repository:
6-
```
6+
7+
```sh
78
$ git remote -v
89
{...}
910
upstream https://github.com/pydata/xarray (fetch)
1011
upstream https://github.com/pydata/xarray (push)
1112
```
1213

14+
<!-- markdownlint-disable MD031 -->
15+
1316
1. Ensure your master branch is synced to upstream:
1417
```sh
1518
git pull upstream master
1619
```
17-
2. Get a list of contributors with:
20+
2. Add a list of contributors with:
1821
```sh
1922
git log "$(git tag --sort="v:refname" | sed -n 'x;$p').." --format=%aN | sort -u | perl -pe 's/\n/$1, /'
2023
```
2124
or by substituting the _previous_ release in {0.X.Y-1}:
2225
```sh
2326
git log v{0.X.Y-1}.. --format=%aN | sort -u | perl -pe 's/\n/$1, /'
2427
```
25-
Add these into `whats-new.rst` somewhere :)
28+
This will return the number of contributors:
29+
```sh
30+
git log v{0.X.Y-1}.. --format=%aN | sort -u | wc -l
31+
```
2632
3. Write a release summary: ~50 words describing the high level features. This
27-
will be used in the release emails, tweets, GitHub release notes, etc.
33+
will be used in the release emails, tweets, GitHub release notes, etc.
2834
4. Look over whats-new.rst and the docs. Make sure "What's New" is complete
2935
(check the date!) and add the release summary at the top.
3036
Things to watch out for:
@@ -45,7 +51,7 @@ upstream https://github.com/pydata/xarray (push)
4551
```
4652
8. Check that the ReadTheDocs build is passing.
4753
9. On the master branch, commit the release in git:
48-
```s
54+
```sh
4955
git commit -am 'Release v{0.X.Y}'
5056
```
5157
10. Tag the release:
@@ -67,7 +73,7 @@ upstream https://github.com/pydata/xarray (push)
6773
twine upload dist/xarray-{0.X.Y}*
6874
```
6975
You will need to be listed as a package owner at
70-
https://pypi.python.org/pypi/xarray for this to work.
76+
<https://pypi.python.org/pypi/xarray> for this to work.
7177
14. Push your changes to master:
7278
```sh
7379
git push upstream master
@@ -80,11 +86,11 @@ upstream https://github.com/pydata/xarray (push)
8086
git push --force upstream stable
8187
git checkout master
8288
```
83-
It's OK to force push to 'stable' if necessary. (We also update the stable
84-
branch with `git cherry-pick` for documentation only fixes that apply the
89+
It's OK to force push to 'stable' if necessary. (We also update the stable
90+
branch with `git cherry-pick` for documentation only fixes that apply the
8591
current released version.)
8692
16. Add a section for the next release {0.X.Y+1} to doc/whats-new.rst:
87-
```
93+
```rst
8894
.. _whats-new.{0.X.Y+1}:
8995
9096
v{0.X.Y+1} (unreleased)
@@ -116,12 +122,12 @@ upstream https://github.com/pydata/xarray (push)
116122
```
117123
You're done pushing to master!
118124
18. Issue the release on GitHub. Click on "Draft a new release" at
119-
https://github.com/pydata/xarray/releases. Type in the version number
125+
<https://github.com/pydata/xarray/releases>. Type in the version number
120126
and paste the release summary in the notes.
121-
19. Update the docs. Login to https://readthedocs.org/projects/xray/versions/
127+
19. Update the docs. Login to <https://readthedocs.org/projects/xray/versions/>
122128
and switch your new release tag (at the bottom) from "Inactive" to "Active".
123129
It should now build automatically.
124-
20. Issue the release announcement to mailing lists & Twitter. For bug fix releases, I
130+
20. Issue the release announcement to mailing lists & Twitter. For bug fix releases, I
125131
usually only email [email protected]. For major/feature releases, I will email a broader
126132
list (no more than once every 3-6 months):
127133
@@ -133,6 +139,8 @@ upstream https://github.com/pydata/xarray (push)
133139
Google search will turn up examples of prior release announcements (look for
134140
"ANN xarray").
135141
142+
<!-- markdownlint-enable MD013 -->
143+
136144
## Note on version numbering
137145
138146
We follow a rough approximation of semantic version. Only major releases (0.X.0)

0 commit comments

Comments
 (0)