@@ -122,7 +122,14 @@ Some thoughts to consider when adding a new message:
122122It's highly recommended to use the docker container to run the release process,
123123the docker container can be pulled from DockerHub and launched via this command:
124124
125- docker run -v $PWD:/mnt/workspace -i -t swiftnav/libsbp-build:2022-06-14
125+ docker run -e SBP_TOX_PARALLEL=auto -v $PWD:/mnt/workspace \
126+ -i -t swiftnav/libsbp-build:2022-06-14
127+
128+ You can invoke individual stages like so:
129+
130+ docker run -e SBP_TOX_PARALLEL=auto -v $PWD:/mnt/workspace \
131+ -i -t swiftnav/libsbp-build:2022-06-14 \
132+ /bin/bash -c "make python"
126133
127134Check this [ link] ( https://hub.docker.com/r/swiftnav/libsbp-build/tags ) for newer tags.
128135
@@ -370,25 +377,40 @@ To distribute java, ensure you have the correct credentials and prerequisites
370377- Sonatype deployer account
371378- Your own GPG key
372379
373- Add in `gradle.properties` located in `.gradle` or wherever the working
374- directory is setup (probably located/have to create it in
375- `$HOME/.gradle/gradle.properties`). It' s recommended to create
376- ` .gradle/gradle.properties` in the ` libsbp` checkout directory so you can
377- invoke docker like this in order to run the ` dist-java` task:
380+ ## Generating GPG key for Java
381+
382+ SonaType open source repo requires a GPG key for signatures. Generate GPG key via:
378383
379384```shell
380- docker run -v $PWD /.gradle:/home/dockerdev/.gradle -v $PWD :/mnt/workspace -i -t swiftnav/libsbp-build:2022-06-14 /bin/bash
385+ gpg --gen-key
386+ gpg --export-secret-keys >keys.gpg
387+ gpg --keyserver keyserver.ubuntu.com --send-keys <KEY_ID>
381388```
382389
383- Then, create ` gradle.properties` as follows:
390+ To locate the value for `signing.keyId` (needed below) run:
391+
392+ ```shell
393+ ❯ gpg --list-keys --keyid-format short (base)
394+ /home/ubuntu/.gnupg/pubring.kbx
395+ -------------------------------
396+ pub rsa3072/AB7D02BF 2022-05-03 [SC] [expires: 2024-05-02]
397+ 573C656383B86BBD618F4ABCFEB6DDB1AB7D02BF
398+ uid [ultimate] Jason Anthony Mobarak <[email protected] > 399+ sub rsa3072/BB59B113 2022-05-03 [E] [expires: 2024-05-02]
400+ ```
401+
402+ The `signing.keyId` value to use from above is `BB59B113`. The `/keys` folder
403+ to should map to location where your gpg key will be stored. Then, create
404+ `gradle.properties` in the `java` directory as follows:
405+
384406
385407```shell
386408# last 8 digit of gpg key
387409signing.keyId=xxx
388410# password for gpg key
389411signing.password=xxx
390412# path to exported secret gpg keys
391- signing.secretKeyRingFile=path_to_secret .gpg
413+ signing.secretKeyRingFile=/keys/keys .gpg
392414
393415# sonatype logins
394416ossrhUsername=xxx
@@ -398,21 +420,21 @@ ossrhPassword=xxx
398420Modify `ossrhUsername` and `ossrhPassword` with the sonatype deployer account
399421(or an individual one with deployer role). See [SonaType getting started
400422guide](https://central.sonatype.org/publish/publish-guide/) for more details.
401- Internal Swift developers should have access to shared credentials.
423+ Internal Swift developers should have access to shared credentials via
424+ LastPass.
425+
426+ For more info see: <https://docs.gradle.org/current/userguide/signing_plugin.html>
427+
428+ Now, invoke docker like this in order to run the `dist-java` task:
402429
403- Generate GPG key with
404430```shell
405- gpg --gen-key
406- gpg --export-secret-keys < key> > keys.gpg
407- gpg --keyserver keyserver.ubuntu.com --send-keys < key>
431+ docker run -v $HOME/Documents:/keys -v $PWD:/mnt/workspace -i -t swiftnav/libsbp-build:2022-06-14
408432```
409433
410- To publish, run ` gradle publish` (via ` make dist-java` ) - (might have some
411- conflicts with the version, so should use Makefile to actually publish with
412- the correct version, so run ` make dist-java` in docker)
413-
414- After publishing, go to Nexus Repository Manager. Select the deployed version,
415- close the staging repository and release to finish it off.
434+ To publish, you' ll run ` make dist-java` (which will run ` gradle sign` and
435+ ` gradle publish` ). After publishing, go to [Nexus Repository
436+ Manager](https://s01.oss.sonatype.org/). Select the deployed version, close the
437+ staging repository and release to finish it off.
416438
417439# Contributions
418440
0 commit comments