Skip to content

Commit

Permalink
Upgrade for fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wsargent committed Apr 13, 2022
1 parent 410c66f commit e393688
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 10 deletions.
72 changes: 66 additions & 6 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,78 @@ To format everything using [Spotless](https://github.com/diffplug/spotless/tree/
./gradlew spotlessApply
```

Releases are handled using [shipkit](https://github.com/mockito/shipkit):
First, try publishing to maven local:

```bash
./gradlew testRelease
./gradlew publishToMavenLocal
```

And then to run the release, which will increment the version number in `version.properties`:
If that works, then publish to Sonatype's staging repository and close:

```bash
./gradlew performRelease
./gradlew publishToSonatype closeSonatypeStagingRepository
```

## Travis
Inspect this in Sonatype OHSSH repository. Delete the staging repository after inspection.

And then to promote it:

```bash
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
```

If it looks weird that you have to specify "publishToSonatype" with another task, that's because [it is weird](https://github.com/gradle-nexus/publish-plugin/issues/19).

## Gradle Signing

If you run into errors with signing doing a `publishToSonaType`, this is common and underdocumented.

```
No value has been specified for property 'signatory.keyId'.
```

For the `signatory.keyId` error message, you need to set `signing.gnupg.keyName` if you
are using GPG 2.1 and a Yubikey 4.

https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials
https://github.com/gradle/gradle/pull/1703/files#diff-6c52391bbdceb4cca64ce7b03e78212fR6

Note you need to use `gpg -K` and pick only the LAST EIGHT CHARS of the public signing key.

> signing.gnupg.keyName = 5F798D53
### PinEntry

Also note that if you are using a Yubikey, it'll require you to type in a PIN, which screws up Gradle.

```
gpg: signing failed: No pinentry
```

So you need to use pinentry-mode loopback, which is helpfully supplied by passphrase.

- https://github.com/sbt/sbt-pgp/pull/142
- https://wiki.archlinux.org/index.php/GnuPG#Unattended_passphrase
- https://github.com/gradle/gradle/pull/1703/files#diff-790036df959521791fdafe474b673924

You want this specified only the command line, i.e.

> $ HISTCONTROL=ignoreboth ./gradlew publishToMavenLocal -Psigning.gnupg.passphrase=$PGP_PASSPHRASE --info
### Cannot Allocate Memory

gpg can't be run in parallel. You'll get this error message.

```
gpg: signing failed: Cannot allocate memory
```
[Gradle is not smart enough to disable this](https://github.com/gradle/gradle/issues/12167).

Do not use `-Porg.gradle.parallel=false` and don't use `--parallel` when publishing.

## Snapshots

If you deploy snapshots to sonatype, you don't get the jar files.

No idea why this happens, but for now only use staging without the -SNAPSHOT prefix.

Travis builds are available under https://travis-ci.org/organizations/tersesystems/repositories
Binary file modified blacklite-reader/src/test/resources/blacklite-zstd-dict.db
Binary file not shown.
Binary file modified blacklite-reader/src/test/resources/blacklite-zstd.db
Binary file not shown.
6 changes: 2 additions & 4 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#Version of the produced binaries. This file is intended to be checked-in.
#It will be automatically bumped by release automation.
version=1.1.0
previousVersion=1.0.1
version=1.1.1
previousVersion=1.1.0

0 comments on commit e393688

Please sign in to comment.