Skip to content

Commit 48d31a9

Browse files
author
Matt Woodward
committed
Alter release process in line with recent observations
1 parent 2f3e28e commit 48d31a9

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

HOWTO.md

+50-50
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ this process is performed using the above docker container. You'll likely want
171171
to run the git commands outside of the container and the `make ...` commands
172172
inside the container (so you don't have to setup git inside the docker container).
173173

174+
This process describes running `make <language>` in multiple places. These targets will
175+
both regenerate the language bindings and then build and run any test suites.
176+
Skipping tests should not be done by default, but most languages have a "gen" target
177+
available - `make gen-<language>` - which will only regenerate the bindings without
178+
running tests. This can be used to split or speed up the process should any errors occur
179+
and something needs to be repeated.
180+
174181
1. It's easiest to do this on the master branch. Start by tagging the release version:
175182

176183
```shell
@@ -213,13 +220,29 @@ inside the container (so you don't have to setup git inside the docker container
213220

214221
```shell
215222
make c haskell javascript rust
216-
make javascript
217-
git add c/include/libsbp/version.h haskell/sbp.cabal javascript/sbp/RELEASE-VERSION package.json package-lock.json rust/sbp/Cargo.toml
223+
git add c/include/libsbp/version.h haskell/sbp.cabal rust/sbp/Cargo.toml
218224
git commit --amend -a -m 'Release <INCREMENTED_TAG>'
219225
git tag -f -a INCREMENTED_TAG -m "Version INCREMENTED_TAG of libsbp."
220226
```
221227

222-
4. Finally, build the docs:
228+
229+
For JavaScript, needs to be run twice to update the package information
230+
```shell
231+
make javascript
232+
make javascript
233+
git add javascript/sbp/RELEASE-VERSION package.json package-lock.json
234+
git commit --amend -a -m 'Release <INCREMENTED_TAG>'
235+
```
236+
237+
For Kaitai
238+
239+
```shell
240+
make kaitai
241+
git add kaitai/ksy/sbp.ksy
242+
git commit --amend -a -m 'Release <INCREMENTED_TAG>'
243+
```
244+
245+
4. Build the docs:
223246

224247
```shell
225248
make docs
@@ -237,24 +260,24 @@ inside the container (so you don't have to setup git inside the docker container
237260
git tag -f -a INCREMENTED_TAG -m "Version INCREMENTED_TAG of libsbp."
238261
```
239262

240-
5. Verify that package dependencies, their version numbers, and the
263+
5. Update the CHANGELOG details with `make release`. Submit a pull request and
264+
get it merged. This requires a GitHub token to be loaded into your environment
265+
at `CHANGELOG_GITHUB_TOKEN`. The Makefile will use docker to run the
266+
tool that generates a `DRAFT_CHANGELOG.md`.
267+
268+
It's generally a good idea to scrub any internal ticket numbers from
269+
`DRAFT_CHANGELOG.md` as they add unnecessary noise for customers.
270+
271+
6. Verify that package dependencies, their version numbers, and the
241272
libsbp version number in the C, Python, JavaScript, and LaTeX developer
242273
documentation are consistent.
243274
244-
6. Push the release to GitHub:
275+
7. Push the release to GitHub:
245276
```shell
246277
git push origin master <INCREMENTED_TAG>
247278
```
248279
249-
7. Update the CHANGELOG details with `make release`. Submit a pull request and
250-
get it merged. This requires a GitHub token to be loaded into your environment
251-
at `CHANGELOG_GITHUB_TOKEN`. The Makefile will use docker to run the
252-
tool that generates a `DRAFT_CHANGELOG.md`.
253-
254-
It's generally a good idea to scrub any internal ticket numbers from
255-
`DRAFT_CHANGELOG.md` as they add uncessary noise for customers.
256-
257-
7. Create a release on
280+
8. Create a release on
258281
[GitHub](https://github.com/swift-nav/libsbp/releases) and add the
259282
section for the new release from `DRAFT_CHANGELOG.md` to the release
260283
notes.
@@ -266,15 +289,17 @@ inside the container (so you don't have to setup git inside the docker container
266289
[Protocol Documentation](https://github.com/swift-nav/libsbp/blob/v3.4.6/docs/sbp.pdf)
267290
```
268291

269-
8. Prep for the next development cycle. Add the new release section from
270-
`DRAFT_CHANGELOG.md` to `CHANGELOG.md` and re-run `make release`.
292+
9. Prep for the next development cycle. Create an empty commit so that version numbers
293+
get regenerated with the `-alpha` tag of the next release, then rebuild all languages
294+
295+
Again, javascript needs to be built twice to get the correct package versions
271296

272297
```
273-
vim/emacs/nano CHANGELOG.md # add new change log entries
274-
git add CHANGELOG.md
298+
git commit --allow-empty -m "prep for next release #no_auto_pr"
275299
make all
276-
git add python/sbp/RELEASE-VERSION c/include/libsbp/version.h haskell/sbp.cabal javascript/sbp/RELEASE-VERSION package.json package-lock.json rust/sbp/Cargo.toml docs/sbp.pdf
277-
git commit -m 'update CHANGELOG.md, prep for next release #no_auto_pr'
300+
make javascript
301+
git add python/sbp/RELEASE-VERSION c/include/libsbp/version.h haskell/sbp.cabal javascript/sbp/RELEASE-VERSION package.json package-lock.json rust/sbp/Cargo.toml docs/sbp.pdf kaitai/ksy/sbp.ksy
302+
git commit -m 'prep for next release #no_auto_pr'
278303
git push origin master
279304
```
280305

@@ -318,37 +343,10 @@ To distribute Rust. Use the `cargo-release` tool:
318343
cargo install cargo-release
319344
```
320345

321-
**FIRST** just try running the `dist-rust` target:
322-
323-
```
324-
make dist-rust
325-
```
326-
327-
If that doesn't work (**status** it don't work, consider fixing the make target),
328-
otherwise try releasing `sbp` and `sbp2json` crates separately, first `sbp`,
329-
this will do a dry run first:
330-
331-
```
332-
cargo release --exclude sbp2json <INCREMENTED_TAG>
333-
```
334-
335-
Then use `--execute` to actually run the release:
346+
Once you have logged in to crates.io with `cargo`:
336347

337-
```
338-
cargo release --exclude sbp2json <INCREMENTED_TAG> --execute
339-
```
340-
341-
Next, release `sbp2son`, first do a dry-run:
342-
343-
```
344-
cargo release --exclude sbp <INCREMENTED_TAG>
345-
```
346-
347-
Then, reset any modifications from the dry run, and then actually release `sbp2son`:
348-
349-
```
350-
git checkout .
351-
cargo release --exclude sbp <INCREMENTED_TAG> --execute
348+
```shell
349+
cargo release <INCREMENTED_TAG> --allow-branch HEAD --execute
352350
```
353351

354352
Then rollback any commits that are created:
@@ -362,6 +360,8 @@ git reset --hard v<INCREMENTED_TAG>
362360
The build of the libsbp wheel can be done via the `libsbp-build` container
363361
described above.
364362

363+
You must have the correct token set in your environment to publish to PyPI.
364+
365365
## Troubleshooting
366366

367367
### Error: `!!! No Python wheel (.whl) file found...`

0 commit comments

Comments
 (0)