Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Making a release

Enrique García Cota edited this page Nov 26, 2018 · 2 revisions

Detach from master branch

git checkout --detach

Create version specific rockspec

  • Update version number
  • Update url to point to eventual github release archive location. Example url = "https://github.com/Kong/kong-plugin-zipkin/archive/v0.1.0.zip";
  • Add dir field. Example: dir = "kong-plugin-zipkin-0.1.0";
  • Remove kong from dependencies
  • Rename from scm rockspec to version specific rockspec (example: kong-plugin-zipkin-0.1.0-0.rockspec)
  • Some dependencies should become less fluid. Notably we pick an explicit opentracing release

Stage renamed rockspec

git rm --cached kong-plugin-zipkin-scm-0.rockspec
git add kong-plugin-zipkin-X.Y.Z-0.rockspec

Update NEWS with release

  • Add any missing NEWS items
  • Change UNRELEASED at the top for the version, add the current date
git add NEWS

Update version number in plugin itself

  • In kong/plugins/zipkin/opentracing.lua, update the VERSION field
git add kong/plugins/zipkin/opentracing.lua

Make release commit

git commit -m "Release vX.Y.Z"

Make release tag

You should make a signed tag (requires a GPG key)

git tag -m '' -s vX.Y.Z

Upload tag to github

git push origin vX.Y.Z

Test rockspec install

This ensures that the tag you uploaded is turned into an archive by github correctly.

luarocks --tree=/tmp/test-tree install kong-plugin-zipkin-X.Y.Z-0.rockspec

Pack your tested rock

This creates a .all.rock file.

luarocks --tree=/tmp/test-tree pack kong-plugin-zipkin

Upload the rockspec to luarocks.org

Make sure you use the kong api key (in 1password).

luarocks upload --api-key=$(cat ~/key) kong-plugin-zipkin-X.Y.Z-0.rockspec

This will additionally create a .src.rock file in your local directory

Make the github release

  • Go to the github new release page.
  • The top left box is actually a drop down to pick your tag. you might need type v in it to get it to autocomplete.
  • Leave release title blank
  • Copy the text from NEWS into the release notes box
  • Upload your .rockspec, .src.rock and .all.rock files for the release

Merge your release back into master

We want master to be the same as before, except with the updated NEWS file

git checkout --force master
git merge --no-ff --no-commit --strategy=ours vX.Y.Z
git checkout vX.Y.Z -- NEWS
git commit --no-edit
git push