sver: easy semantic versioning for your artifacts

math equations

Installing

$ go install github.com/aserto-dev/sver/cmd/sver@latest
$ brew tap aserto-dev/tap
$ brew install aserto-dev/tap/sver

Getting your current version

$ git clone git@github.com:aserto-dev/sver.git
$ cd sver
$ sver
1.3.2
$ sver -n patch
1.3.3
$ sver -n minor
1.4.0
$ sver -n major
2.0.0

Docker image tagging

$ sver tags -s ghcr.io aserto-dev/sver -u ogazitt -p <PAT>1.3.2
1.3
1
latest

Github Action

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v1
with:
registry: https://ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Calculate Tags
id: "calc_tags"
uses: aserto-dev/sver-action@v0.0.13
with:
docker_image: "aserto-dev/aserto-console-backend"
docker_registry: "https://ghcr.io"
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Image
run: |
docker build -t "aserto-dev/aserto-console-backend" .
- name: Push image to GitHub Container Registry
run: |
echo "${{ steps.calc_tags.outputs.version }}" | \
xargs -I{} bash -c "docker tag aserto-dev/aserto-console-backend aserto-dev/aserto-console-backend:{} && docker push aserto-dev/aserto-console-backend:{}"

In conclusion…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aserto

Aserto

Welcome to modern authorization.