Skip to content

FlatBuffers release process

Derek Bailey edited this page Aug 23, 2022 · 31 revisions

Steps to release a new version of FlatBuffers to github:

Flatc and C++

  1. Update version in include/flatbuffers/base.h

  2. Update version in CMake/Version.cmake

  3. Update version-check in generated include/flatbuffers/reflection_generated.h

    This is needed because we have a catch-22 where we use this generated file within flatc, which makes that file. But it will complain that the flatbuffer libraries mismatch.

  4. Rebuild flatc

  5. Run scripts/generated_code.py

  6. Update CHANGELOG.md

  7. Make a git commit with a message: Flatbuffers Version X.X.X

  8. Go through the normal PR process to get the commit submitted

  9. Generate an annotated tag for the release. Make sure this is done directly in the flatbuffer repo and not via a pull request.

    git tag -a -m "Flatbuffers Version X.X.X" vX.X.X

  10. Push the tag to github (again not via a PR).

    git push origin v.X.X.X

  11. The result should be a tagged commit at the following: https://github.com/google/flatbuffers/tags

To Categorize / Old Notes

  • Change the version number in base.h, package.json, pom.xml (and various such files in grpc/), CMakeLists.txt (FlatBuffers_Library_SONAME_FULL), CMake/Version.cmake, dart/pubspec.yaml, rust/cargo.toml (not same as FlatBuffers version), Constants.java, FlatBufferConstants.cs, idl_gen_java/csharp/kotlin/swift.cpp
  • re-build flatc
  • runs generate_code.sh to ensure there's no missing files.
    • And also because the version number is in some generated files.
    • Also run SwiftTest.sh in tests/FlatBuffers.Test.Swift since it generates code (FIXME)
    • ../../../../flatc --swift --grpc greeter.fbs in tests/FlatBuffers.GRPC.Swift/Sources/Model (FIXME)
  • (search for 1.12 and 1_12 to be sure).
  • push to github.
  • Update the documentation remote branch gh-pages that hosts what is shown at http://google.github.io/flatbuffers/ using something like (warning, this will go live instantly):
    • cd docs/source
    • doxygen
    • cd ../../.. (one up from flatbuffers root)
    • git clone -b gh-pages --single-branch https://github.com/google/flatbuffers.git gh-pages
    • cd gh-pages
    • cp -r ../flatbuffers/docs/html/* .
    • git add *
    • git commit
    • git push
    • cd ..
    • rm -rf gh-pages flatbuffers/docs/html
  • Tag this release by version number, e.g.:
    • git tag -a -m "FlatBuffers release 1.0.0" v1.0.0
  • git push yourgithubremotename v1.0.0
  • On the github releases page, add a release description to this tag, with a description of what changed etc.
    • Also add flatc binaries from the last CI run for win/lin/mac
  • For JS:
    • (version has already been changed in package.json)
    • (on npm <4.0): npm run append-esm-export
    • npm login
    • npm publish
    • (note npm adduser needs a newer node than what's available on my machine?)
    • Check changes are on: https://www.npmjs.com/package/flatbuffers
  • For Java:
    • (version already changed in pom.xml)
    • mvn clean deploy -P release
    • Not needed / working?
      • mvn release:clean release:prepare
      • mvn release:perform
    • (see http://central.sonatype.org/pages/apache-maven.html for details).
    • This requires an account with oss.sonatype.org, a gpg key registered with a keyserver, and your user/pass in .m2/settings.xml (Maven) to work, among other mysterious things.
    • Note: some of the above commands tend to error out, since it is all some crazy async complex system.. but it will then succeed later anyway (shows up the new version on maven central).
    • For gRPC:
  • For Dart:
  • For Python:
  • For Rust:
    • Tell @rw to upload after release.
  • For C#:
Clone this wiki locally