Skip to content

How to make a release

Karel Minarik edited this page Sep 23, 2020 · 2 revisions

How to make a release

This document describes the process of releasing a new version of the client.

Branches and versions

The client tracks the supported major versions of the stack in the following branches:

  • master
  • 7.x
  • 6.x

During a feature-freeze phase, a new branch is created from the corresponding version branch. As an example, to prepare for a 7.10.0 release of the stack, a 7.10 branch is created from the 7.x branch and pushed to Github.

Generating the Go API

The Go API is generated from the common specification. The important thing is to generate from the correct version of the specification.

You need to clone the https://github.com/elastic/elasticsearch repository locally, so you can check out a specific revision of the code.

First, launch the cluster with the following command:

$ make cluster-clean cluster-update cluster

Then, fetch the build hash from the cluster:

$ curl -s http://localhost:9200 | jq -r '.version.build_hash'
# => 152ee3aca4d6f47637ff9062f6a064349026ed8c

Navigate to the cloned Elasticsearch repository, and checkout the Git commit corresponding to the build hash:

cd tmp/elasticsearch
git pull
git checkout 152ee3aca4d6f47637ff9062f6a064349026ed8c

Navigate back to the client repository and run the code generation:

make gen-api

Create the release

Inspect the changes in the repository and commit them:

git status --short --branch
git add esapi/
git commit --verbose --message='API: Update the APIs for Elasticsearch 8.x (152ee3ac)'

Push the changes to Github:

git push

In order to create a new release, you have to update the version in the internal/version/version.go file. Use the Make command for that:

make release version=7.10

The command will print the instructions for pushing the resulting tags to Github.

Finally, open the release page in your browser, and update the description with relevant changes for this version.

Clone this wiki locally