Skip to content

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

Notifications You must be signed in to change notification settings

eddwinpaz/versioning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages