Release managment
semlanik このページを編集 4 年 前

Idea

Relases are splited into 3 types:

  • Major
  • Minor
  • Bufix

Each release type has assigned number in version <major.minor.bugfix>.

Major

Major release includes huge features, collects all minor changes and bugfixes.

Minor

Minor release includes small features and also could have public API change. It also collects changes and bugfixes from previous versions.

Bugfix

Bugfix releases doesn't change API and collects minor bugfixes and change in behavior.

Release step-by-step instructions

  1. Create and update release notes in CHANGES.txt
  2. Change QTPROTOBUF_PROJECT_VERSION in root CMakeLists.txt
  3. Update tests if required
  4. Update ci rules
  5. Update README
  6. Update documentation accordingly on gh-pages branch
  7. Create release branch
  8. Create release tags

Create and update release notes

Edit CHANGES.txt and add relese notes of following format:

<yyyy-mm-dd> version <major.minor.bugfix> (<Components list separated by '/'>)

  Component name
  * Major changes
  * Major git commit summary included to release

E.g. :

2019-12-29 version 0.1.0 (QtProtobuf/QtGrpc/Generator)

  QtProtobuf
  * git commit summary included to release
  * Implement subscriptions reusage
  * Use pre-generated ubuntu image for ci
  QtGrpc
  * Major git commit summary included to release

List of commits included to release could be collected using:

git log --pretty=format:"* %s" previous_version_tag..HEAD

Change QTPROTOBUF_PROJECT_VERSION in root CMakeLists.txt

QTPROTOBUF_PROJECT_VERSION variable should be incremented in root CMakeLists.txt file according to released version

...
set(QTPROTOBUF_PROJECT_VERSION <major>.<minor>.<bugfix>)
...

Update tests if required

When minor version is changed, it's required to updated qml tests, because they depend on QtProtobuf QML plugin.

Edit tests/test_qml/qml/tst_simple.qml and change import version accordingly:

...
import QtProtobuf <version_major>.<version_minor>
...

Update ci rules

Add newly created branch to:

  1. .github/workflows/branchpush.yml
  2. .travis.yml

Update README

Add branch and badges to Test results section in README.md

Update documentation accordingly on gh-pages branch

Run cmake --build . -- doc in your build directory

This will generate <build_dir>/doxygen/html folder. Content of this folder should be copied to root of repository gh-pages branch. Recomended procedure:

git clone git@github.com:semlanik/qtprotobuf.git qtprotobuf-gh-pages
cd qtprotobuf-gh-pages
git checkout gh-pages
rm -rf ./*
cp -a <build_dir>/doxygen/html/* ./
git add .
git commit -a --amend --no-edit
git push -f origin gh-pages

Create release branch

Creating of this branch is only applicable for major and minor releases.

Branch naming format v<major&gt.<minor&gt

After release notes updated and version incremented accordingly, release commit should be created on master branch and pushed to remotes.

Create release branch based on release commit.

git checkout -b <major>.<minor>
git push origin <major>.<minor>

E.g.

git checkout -b 0.1
git push origin 0.1

Create release tags

For each release either major/minor/bugfix tag should be created and pushed to all remotes.

git tag v<major>.<minor>.<bugfix>
git push --tags origin master