1.6.0 • Published 2 years ago

@working-group-two/wgtwoapis v1.6.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

Actions License Java gRPC version

Working Group Two APIs

This repository contains the public APIs of Working Group Two.

Working Group Two's APIs uses gRPC backed by Protocol Buffers. This repository contains both the .proto files that can be used to generate clients and documentation, in addition to ready made Maven packages to simplify integration.

Contents:

Documentation

See https://docs.wgtwo.com

Setup required to release/deploy from local machine:

See our internal wiki for the required local tooling/setup for releasing to the maven central repository.

Java/Maven artifacts

The java artifacts are released to maven central. We use semver, but the first number/major version iteration represents the "v0" or "v1" part of the api. That is, all releases of version 1 of the sms api should have 1 as their major number. Running release:prepare will increase the patch version by one (major.minor.patch). If you need to increase the major or minor version, increment this manually in the various pom.xml files before running the commands below. E.g. if the current version is x.y.z-SNAPSHOT, version x.y.z is the version that will be released next. To instead release version x.b.0, edit the pom.xml files and set the version property to x.b.0-SNAPSHOT.

Release/deploy v0

  1. ./mvnw build-helper:parse-version release:prepare -B --file wgtwo/v0/pom.xml
  2. ./mvnw release:perform --file wgtwo/v0/pom.xml

Release/deploy v1

  1. ./mvnw build-helper:parse-version release:prepare -B --file wgtwo/v1/pom.xml
  2. ./mvnw release:perform --file wgtwo/v1/pom.xml

Troubleshooting

If you get an error about "gpg: signing failed: Inappropriate ioctl for device", run these commands in your shell and try again:

GPG_TTY=$(tty)
export GPG_TTY

Rolling back a release:prepare that went horribly wrong

Maybe you forgot to set the intended version number in the pom.xml files before running the command. Maybe you didn't know that it would create new commits. Anyway those commits have now been pushed to github so you'll have to edit the history and do a force push.

  1. run ./mvnw release:rollback --file wgtwo/vX/pom.xml
  2. delete the tag created by maven locally: git tag -d $TAG
  3. delete the tag on the remote: git push --delete $REMOTE $TAG

Protobuf FileDescriptorSet release

This requires that you have buf installed. See note below.

  1. buf build -o image.bin

Go release

This requires that you have buf and the Go protoc plugins installed. See note below.

We do include generated go code as part of this repo, which is generated by Buf

  1. buf generate

Buf and other required tooling

Building the FileDescriptorSet and Go code requires some tooling:

  1. buf (https://docs.buf.build/installation)
  2. protoc-gen-go (https://pkg.go.dev/google.golang.org/protobuf)
  3. protoc-gen-go-grpc (https://pkg.go.dev/google.golang.org/grpc/cmd/protoc-gen-go-grpc)

We have Hermit support, which will provide the required packages.

NPM package

The release for the Node.js Package Manager so far only contains the .proto files, since the other contents of the origin repository are not relevant for this type of packaging.

The package is available both on the Github Registry and on NPMJS.