replicatedhq / replicatedhq/replicated

Auto-increment semver version when promoting a release to a channel

Open
#222 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
36
Forks
25
Avg merge
9h 27m
Merged PRs (30d)
3

Description

Problem to Solve

The vendor portal makes it pretty easy to auto-increment semver versions when promoting. The CLI is not as straightforward. Right now, to promote a release to the stable channel, my default is:

  1. get the most recent release on the Stable channel's current semver (e.g. 1.0.2)
  2. increment it by a minor or patch version e.g. (1.1.0)
  3. Use that to promote it:
replicated release promote 35 Stable --version 1.1.0

To do this in a one liner, you can use a tool like semver from the NPM registry:

replicated release promote 35 Stable --version $(npx semver -i minor $(replicated channel ls |grep Stable | awk '{print $4}'))

Proposed solution

It would be great to just have

replicated release promote 35 Stable --version-increment=minor
# or
replicated release promote 35 Stable --version-increment=patch

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the CLI implementation for replicated release promote and inspect how the existing --version value is handled, along with the release channel's current semver lookup. Done means --version-increment=minor and --version-increment=patch calculate the next version and promote the release without requiring a manually supplied version.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.