Skip to content

Latest commit

 

History

History
137 lines (95 loc) · 5.95 KB

RELEASE.md

File metadata and controls

137 lines (95 loc) · 5.95 KB

Releases

Every release is tagged v<version>, such as v1.4.0-beta.1, and publishes the image with the tag 1.4.0-beta.1 on ghcr.io and Docker Hub.

Important

A push that changes release.json releases the version it sets, unless that version is released already. Run scripts/plan-version.sh first to see what a push releases.

Rules

Branch Takes Releases
main fixes, and next or a release branch for a new version stable versions
next features prereleases of the next minor or major
release/v1.4 the minor 1.4, split off next so next can go on to 1.5 prereleases of 1.4.0
release/v2.0 the next major, cut from next prereleases of 2.0.0
v1.x backports, once main is on v2 stable 1.x versions
v1.2.x backports and hotfixes, cut from the newest tag of v1.2 stable 1.2.x versions
  • main takes fixes only. A new minor or major reaches it as a merge of next or a release branch
  • next and the release branches publish prereleases only, their stable versions are released on main
  • Name a branch after what it changes: fix/<topic>, feat/<topic>, and fix/<topic>-v1.2.2 for a backport, after the version that releases it
  • Squash merge pull requests from contributors and pull requests with a single change, such as tool updates
  • Merge everything else with a merge commit: team pull requests with several commits, backports, next, the release branches and v1.3.x into main
  • The merge forward workflow merges main into release/v1.4 and next, and release/v1.4 into next
  • While main is on 1.3, v1.1.x and v1.2.x are never merged into another branch
  • Delete release/v1.4 once main has released 1.4.0
  • Delete v1.3.x once it is merged into main
  • Delete v1.1.x and v1.2.x once their release is published, the next backport cuts them again from the newest tag

Caution

Never squash merge next or a release branch. Their commits stay unmerged and come back as conflicts in every later merge.

Create a release

Note

next publishes prereleases only. For its stable version, merge next into main with a merge commit and create the release on main.

  1. Describe the changes under ## [Unreleased] in CHANGELOG.md, they become the release notes

  2. Check what the branch releases:

    scripts/plan-version.sh
  3. Select the stage and the version, the script commits them and asks to push:

    scripts/release.sh
  4. The pushed commit changes release.json, so it runs the release workflow, which builds and publishes the release and moves its tags

Tip

To take the release commit back before the push:

scripts/undo-release.sh

Backport a fix

main is on 1.3, and 1.1 and 1.2 still get fixes. A fix reaches each of them through a patch branch and a pull request of its own:

  1. Cut the patch branch from the newest tag of the minor, unless it exists:

    git switch -c v1.2.x v1.2.1 && git push -u origin v1.2.x
  2. Put the fix on a branch named after the version that releases it, cherry-picked from main when it is there already:

    git switch -c fix/<topic>-v1.2.2 origin/v1.2.x && git cherry-pick -x <commit>
  3. Merge a pull request from fix/<topic>-v1.2.2 into v1.2.x with a merge commit

  4. Create the release on your checkout of v1.2.x:

    git switch v1.2.x && git pull && scripts/release.sh
  5. Repeat with v1.1.x and fix/<topic>-v1.1.4. 1.0 gets no backports

Important

A hotfix for 1.3 while main holds unreleased changes goes through v1.3.x the same way. Merge v1.3.x into main with a merge commit afterwards and delete it. v1.1.x and v1.2.x are never merged, their fixes come from main.

Update a tool

  1. Set the new version in src/Dockerfile and write its checksums:

    scripts/helper-checksums
  2. List the update under ## [Unreleased] in CHANGELOG.md and create a release

Release a major version

  1. Cut release/v2.0 from next and create its prereleases there with scripts/release.sh:

    git switch -c release/v2.0 origin/next && git push -u origin release/v2.0
  2. Merge main into release/v2.0, so v2 has every fix of v1 and the pull request into main has no conflicts:

    git switch release/v2.0 && git pull && git merge origin/main && git push
  3. Keep v1 on a branch of its own:

    git switch -c v1.x origin/main && git push -u origin v1.x
  4. Merge a pull request from release/v2.0 into main with a merge commit

  5. Create the release on main and select 2.0.0:

    git switch main && git pull && scripts/release.sh
  6. Delete release/v2.0

Important

Cut v1.x from main, or bring an existing one up to date with main, before release/v2.0 is merged into main. Afterwards main is v2 and v1 lives on v1.x alone.

Pull requests

The pull request workflow builds every pull request and publishes the image of a pull request from a branch of this repository as ghcr.io/coollabsio/coolify-helper:pr-<number>.

  • Pull requests from forks and Dependabot are built, not published
  • A push to a pull request from main, next, a release branch or a patch branch that changes release.json is not built, the release workflow builds it
  • Pull request builds are published to ghcr.io only, as the Docker Hub credentials are in the release environment, which no pull request run can use
  • Pull request builds create no git tag and no GitHub release