#!/bin/sh tag="$(git describe --abbrev=0 2>/dev/null)" IFS=. read -r major minor patch <&2 exit 1 ;; esac git shortlog "$tag"..HEAD | git tag -s "v${major}.${minor}.${patch}" --file -