Skip to content

Instantly share code, notes, and snippets.

@jeremija
Created November 30, 2015 15:43
Show Gist options
  • Save jeremija/93a240e88697624a84d7 to your computer and use it in GitHub Desktop.
Save jeremija/93a240e88697624a84d7 to your computer and use it in GitHub Desktop.
Automatically create git tags from svn tags
#!/bin/bash
git log --oneline | grep 'prepare release' | while read line; do
COMMIT_ID=$(echo $line | cut -f 1 -d ' ')
VERSION=$(echo $line | sed 's/.*prepare release \(.*\)$/\1/g')
echo $COMMIT_ID is $VERSION
git tag "v$VERSION" $COMMIT_ID~1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment