Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Olivier Stasse
Gepetto Utils
Commits
a3f209e1
Commit
a3f209e1
authored
Mar 14, 2018
by
Guilhem Saurel
Browse files
release.sh: don't worry if the tag already exists
parent
dab80451
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/release.sh
View file @
a3f209e1
#!/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"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment