Skip to content

Commit f88066e

Browse files
author
Doruk Ozturk
committed
Clarify conda release steps
1 parent 162ec7b commit f88066e

File tree

1 file changed

+46
-8
lines changed

1 file changed

+46
-8
lines changed

docs/source/make_a_release.rst

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,43 +161,81 @@ PyPI: Step-by-step
161161
Conda: Step-by-step
162162
-------------------
163163

164+
.. warning::
165+
166+
Publishing on conda requires you to have corresponding package version uploaded on
167+
`PyPI`_. So you have to do the PypI and Github release before you do the conda release.
168+
164169
In order to release a new version on conda-forge, follow the steps below:
165170

166-
1. Clone feedstock
171+
1. Choose the next release version number (that matches with the pypi version that you already published)
172+
173+
.. code::
174+
175+
$ release=X.Y.Z
176+
177+
2. Fork pynwb-feedstock
178+
179+
First step is to fork `pynwb-feedstock <https://github.com/conda-forge/pynwb-feedstock>`_ repository.
180+
This is the recommended `best practice <https://conda-forge.org/docs/conda-forge_gotchas.html#using-a-fork-vs-a-branch-when-updating-a-recipe>`_ by conda.
181+
182+
183+
3. Clone forked feedstock
184+
185+
Fill the YOURGITHUBUSER part.
167186

168187
.. code::
169188
170-
$ cd /tmp && \
171-
git clone [email protected]:conda-forge/pynwb-feedstock.git
189+
$ cd /tmp && git clone https://github.com/YOURGITHUBUSER/pynwb-feedstock.git
172190
173191
174-
2. Create a new branch
192+
4. Download corresponding source for the release version
193+
194+
.. code::
195+
196+
$ cd /tmp && \
197+
wget https://github.com/NeurodataWithoutBorders/pynwb/releases/download/$release/pynwb-$release.tar.gz
198+
199+
5. Create a new branch
175200

176201
.. code::
177202
178203
$ cd pynwb-feedstock && \
179204
git checkout -b $release
180205
181206
182-
3. Modify meta.yaml
207+
6. Modify ``meta.yaml``
183208

184209
Update the `version string <https://github.com/conda-forge/pynwb-feedstock/blob/master/recipe/meta.yaml#L2>`_ and
185210
`sha256 <https://github.com/conda-forge/pynwb-feedstock/blob/master/recipe/meta.yaml#L3>`_.
186211

212+
We have to modify the sha and the version string in the ``meta.yaml`` file.
213+
214+
For linux flavors:
215+
187216
.. code::
188217
189218
$ sed -i "2s/.*/{% set version = \"$release\" %}/" recipe/meta.yaml
190-
$ sha=$(openssl sha256 ../pynwb/dist/*.tar.gz | awk '{print $2}')
219+
$ sha=$(openssl sha256 /tmp/pynwb-$release.tar.gz | awk '{print $2}')
191220
$ sed -i "3s/.*/{$ set sha256 = \"$sha\" %}/" recipe/meta.yaml
192221
222+
For macOS:
223+
224+
.. code::
225+
226+
$ sed -i -- "2s/.*/{% set version = \"$release\" %}/" recipe/meta.yaml
227+
$ sha=$(openssl sha256 /tmp/pynwb-$release.tar.gz | awk '{print $2}')
228+
$ sed -i -- "3s/.*/{$ set sha256 = \"$sha\" %}/" recipe/meta.yaml
229+
230+
193231
194-
4. Push the changes
232+
7. Push the changes
195233

196234
.. code::
197235
198236
$ git push origin $release
199237
200-
5. Create a Pull Request
238+
8. Create a Pull Request
201239

202240
Create a pull request against the `main repository <https://github.com/conda-forge/pynwb-feedstock/pulls>`_. If the tests are passed
203241
a new release will be published on Anaconda cloud.

0 commit comments

Comments
 (0)