eddwinpaz / versioning

Generate semantic versioning major.minor.patch for Docker, Git and other tool tagging

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Versioning

How to use it?

Simple just install go and execute

./versioning minor ./version.txt
./versioning patch ./version.txt
./versioning major ./version.txt

Important

  • Remember to place the version.txt at the level of the compiled versioning code.

Want to collaborate?

  • Make a pull request

Increment version using Docker

(remember you can only use major, minor, patch) run:

sh version.sh minor

version.sh

#!/usr/bin/env bash

./versioning $1 ./version.txt

VERSION=$(cat ./version.txt)
echo "πŸ†š New version: $VERSION"

# Build the image, passing in the version number as a build argument
PACKAGE_NAME=my-app:$version

echo "πŸ—οΈ  Building $PACKAGE_NAME"
docker build -t package_name .

echo "πŸ“ Pushing $PACKAGE_NAME" 
docker push $package_name

About

Generate semantic versioning major.minor.patch for Docker, Git and other tool tagging


Languages

Language:Go 100.0%