Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #/bin/bash
  2. branch=master
  3. versionfile=src/module/__init__.py
  4. for commit in $(git rev-list $branch --reverse)
  5. do
  6. version=$(git show $commit:$versionfile | sed -n -e "s/^__version__ = \"\([0-9]\+\(\.[0-9]\)\+\)\"/\1/p")
  7. echo $version
  8. git tag -a v$version $commit -m "Release, v$version"
  9. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement