replicated
replicated copied to clipboard
Auto-increment semver version when promoting a release to a channel
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:
- get the most recent release on the Stable channel's current semver (e.g.
1.0.2
) - increment it by a minor or patch version e.g. (
1.1.0
) - 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