Skip to content
Snippets Groups Projects
Commit 13078f41 authored by Sam Gleske's avatar Sam Gleske
Browse files

Updating SVN tags for bash best practices

parent 078204f1
No related branches found
No related tags found
No related merge requests found
...@@ -37,11 +37,11 @@ if git config --get svn-remote.svn.url &> /dev/null;then ...@@ -37,11 +37,11 @@ if git config --get svn-remote.svn.url &> /dev/null;then
git svn fetch git svn fetch
git svn rebase git svn rebase
git for-each-ref --format="%(objectname:short) %(refname)" refs/remotes/tags | while read ref; do git for-each-ref --format="%(objectname:short) %(refname)" refs/remotes/tags | while read ref; do
objectname=$(echo ${ref} | cut -d " " -f 1) tagname="${ref##*/}"
tagname=$(echo ${ref} | cut -d " " -f 2 | cut -d / -f 4) if ! git show-ref --tags | grep -q "refs/tags/${tagname}$"; then
if ! git show-ref --tags | grep -E -q "refs/tags/${tagname}$"; then
echo "Tag does not exist... creating it" echo "Tag does not exist... creating it"
GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag -a ${tagname} -m "import '${tagname}' tag from svn" ${objectname} objectname="${ref%% *}"
GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag -a "${tagname}" -m "import '${tagname}' tag from svn" "${objectname}"
fi fi
done done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment