replicated icon indicating copy to clipboard operation
replicated copied to clipboard

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

Open dexhorthy opened this issue 2 years ago • 0 comments

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

dexhorthy avatar Dec 23 '22 22:12 dexhorthy