Skip to content

Instantly share code, notes, and snippets.

@jdunmore
Created February 24, 2016 12:02
Show Gist options
  • Save jdunmore/19fb8be74ad39c19aec1 to your computer and use it in GitHub Desktop.
Save jdunmore/19fb8be74ad39c19aec1 to your computer and use it in GitHub Desktop.
Bash Script for incrementing a sementic version
#!/bin/bash
if [ $# -ne 1 ]; then
echo $0: usage: script current_version
exit 1
fi
v=$1
echo "${v%.*}.$((${v##*.}+1))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment