@@ -171,6 +171,13 @@ this process is performed using the above docker container. You'll likely want
171
171
to run the git commands outside of the container and the ` make ... ` commands
172
172
inside the container (so you don't have to setup git inside the docker container).
173
173
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
+
174
181
1 . It's easiest to do this on the master branch. Start by tagging the release version:
175
182
176
183
``` shell
@@ -213,13 +220,29 @@ inside the container (so you don't have to setup git inside the docker container
213
220
214
221
` ` ` shell
215
222
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
218
224
git commit --amend -a -m ' Release <INCREMENTED_TAG>'
219
225
git tag -f -a INCREMENTED_TAG -m " Version INCREMENTED_TAG of libsbp."
220
226
` ` `
221
227
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:
223
246
224
247
` ` ` shell
225
248
make docs
@@ -237,24 +260,24 @@ inside the container (so you don't have to setup git inside the docker container
237
260
git tag -f -a INCREMENTED_TAG -m " Version INCREMENTED_TAG of libsbp."
238
261
` ` `
239
262
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
241
272
libsbp version number in the C, Python, JavaScript, and LaTeX developer
242
273
documentation are consistent.
243
274
244
- 6 . Push the release to GitHub:
275
+ 7 . Push the release to GitHub:
245
276
```shell
246
277
git push origin master <INCREMENTED_TAG>
247
278
```
248
279
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
258
281
[GitHub](https://github.com/swift-nav/libsbp/releases) and add the
259
282
section for the new release from `DRAFT_CHANGELOG.md` to the release
260
283
notes.
@@ -266,15 +289,17 @@ inside the container (so you don't have to setup git inside the docker container
266
289
[Protocol Documentation](https://github.com/swift-nav/libsbp/blob/v3.4.6/docs/sbp.pdf)
267
290
` ` `
268
291
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
271
296
272
297
` ` `
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"
275
299
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'
278
303
git push origin master
279
304
` ` `
280
305
@@ -318,37 +343,10 @@ To distribute Rust. Use the `cargo-release` tool:
318
343
cargo install cargo-release
319
344
` ` `
320
345
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` :
336
347
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
352
350
` ` `
353
351
354
352
Then rollback any commits that are created:
@@ -362,6 +360,8 @@ git reset --hard v<INCREMENTED_TAG>
362
360
The build of the libsbp wheel can be done via the ` libsbp-build` container
363
361
described above.
364
362
363
+ You must have the correct token set in your environment to publish to PyPI.
364
+
365
365
# # Troubleshooting
366
366
367
367
# ## Error: `!!! No Python wheel (.whl) file found...`
0 commit comments