-
Notifications
You must be signed in to change notification settings - Fork 637
How to make a release
This document describes the process of releasing a new version of the client.
The client tracks the supported major versions of the stack in the following branches:
master7.x6.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.
The Go API is generated from the Rest API specification. The important thing is to generate from the correct version of the specification.
Clone the https://github.com/elastic/elasticsearch repository locally in ./tmp/elasticsearch, so you can check out a specific revision of the code.
By default a snapshot of the current branch will be used. If needed, choose the specific version you want to generate APIs for by setting the version environment variable, e.g. export version="elasticsearch:7.10.0"
Launch the cluster with the following command:
$ make cluster-clean cluster-update clusterFetch the build hash from the cluster:
# For Elasticsearch
$ curl -ks -u elastic:elastic https://localhost:9200 | jq -r '.version.build_hash'
# For Elasticsearch-oss
$ curl -s http://localhost:9200 | jq -r '.version.build_hash'
# => 152ee3aca4d6f47637ff9062f6a064349026ed8cNavigate to the cloned Elasticsearch repository, and checkout the Git commit corresponding to the build hash:
cd tmp/elasticsearch
git pull
git checkout 152ee3aca4d6f47637ff9062f6a064349026ed8cNavigate back to the client repository and run the code generation:
make gen-apiInspect 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 pushIn 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.0The 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.