franiglesias / versiontag

Bash command to automate tag semantic versioning
MIT License
46 stars 13 forks source link

Different sets of versions #8

Open franiglesias opened 5 years ago

franiglesias commented 5 years ago

what about different sets of versions: for example there is one package in more versions lets say: v2.3.0 and v2.4.0, and you want to create patch v2.3.1

pkristian commented 5 years ago

I have it!

git log \
    --oneline \
    --decorate=short \
    --format="%D" \
    --single-worktree \
|   sed 's/, /\n/g' \
|   grep '^tag: '    \
|   sed 's/tag: //'       \
|   grep "^v[0-9]*\.[0-9]*\.[0-9]*$" \
|   head -1