@@ -171,6 +171,13 @@ this process is performed using the above docker container. You'll likely want
171171to run the git commands outside of the container and the ` make ... ` commands
172172inside 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+
1741811 . 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:
318343cargo 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:
336-
337- ` ` `
338- cargo release --exclude sbp2json < INCREMENTED_TAG> --execute
339- ` ` `
346+ Once you have logged in to crates.io with ` cargo` :
340347
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
354352Then rollback any commits that are created:
@@ -362,6 +360,8 @@ git reset --hard v<INCREMENTED_TAG>
362360The build of the libsbp wheel can be done via the ` libsbp-build` container
363361described 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...`
@@ -409,9 +409,15 @@ SonaType open source repo requires a GPG key for signatures. Generate GPG key v
409409` ` ` shell
410410gpg --gen-key
411411gpg --export-secret-keys > keys.gpg
412- gpg --keyserver keyserver.ubuntu.com --send-keys < KEY_ID>
413412` ` `
414413
414+ Export your public key
415+ ```
416+ gpg --export -a > pub.key
417+ ```
418+
419+ Go to [https://keyserver.ubuntu.com/#submitKey](https://keyserver.ubuntu.com/#submitKey) and upload your PUBLIC key
420+
415421To locate the value for `signing.keyId` (needed below) run:
416422
417423```shell
@@ -464,7 +470,8 @@ staging repository and release to finish it off.
464470Follow the instructions here for how to "close" and then "release" and staging
465471repository on SonaType's repository manager:
466472
467- - < https://central.sonatype.org/publish/release>
473+ - [ Documentation] ( https://central.sonatype.org/publish/release )
474+ - [ Nexus Repository Manager] ( https://s01.oss.sonatype.org/#welcome )
468475
469476# Contributions
470477
0 commit comments