Commit a3f209e1 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

release.sh: don't worry if the tag already exists

parent dab80451
#!/bin/bash
set -x
set -e
TAG=$1
SOFT=${2:-$(basename $(pwd))}
SOFTAG="${SOFT}-${TAG}"
......@@ -11,7 +9,14 @@ SOFTAG="${SOFT}-${TAG}"
echo Releasing $SOFTAG
rm -vf *.tar* /tmp/*.tar*
git tag -s "v$TAG" -m "Release v$TAG"
if $(grep -q "v$TAG" <<< $(git tag))
then
echo -e "\n!!! Ce tag existe !!!\n"
else
git tag -s "v$TAG" -m "Release v$TAG"
fi
if [[ -d cmake && -x cmake/git-archive-all.sh ]]
then
./cmake/git-archive-all.sh --prefix "${SOFTAG}/" -v "${SOFTAG}.tar"
......@@ -21,6 +26,6 @@ else
fi
gpg --armor --detach-sign "${SOFTAG}.tar.gz"
echo -e "git push --tags
git log --pretty=oneline $(git tag -l|tail -n2|sed ':a;N;$!ba;s/\n/../g') | sed 's/.\{48\}/*/'
# Draft new release"
echo -e "git push --tags"
echo -e "git log --pretty=oneline $(git tag -l|tail -n2|sed ':a;N;$!ba;s/\n/../g') | sed 's/.\{48\}/*/'"
echo -e "# Draft new release"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment