mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-12 15:17:14 +03:00
Merge pull request #386 from oliv3r/dev/fix_version_tag
version: Do not put a slash in the version tag
This commit is contained in:
commit
4cbff962db
@ -10,12 +10,12 @@ fi
|
|||||||
if [ ! -d .git ] || ! `(git status | grep -q "On branch") 2> /dev/null`; then
|
if [ ! -d .git ] || ! `(git status | grep -q "On branch") 2> /dev/null`; then
|
||||||
# If we don't have git, we can't work out what
|
# If we don't have git, we can't work out what
|
||||||
# version this is. It must have been downloaded as a
|
# version this is. It must have been downloaded as a
|
||||||
# zip file.
|
# zip file.
|
||||||
|
|
||||||
# If downloaded from the release page, the directory
|
# If downloaded from the release page, the directory
|
||||||
# has the version number.
|
# has the version number.
|
||||||
release=`pwd | sed s/.*sslh-// | grep "[[:digit:]]"`
|
release=`pwd | sed s/.*sslh-// | grep "[[:digit:]]"`
|
||||||
|
|
||||||
if [ "x$release" = "x" ]; then
|
if [ "x$release" = "x" ]; then
|
||||||
# If downloaded from the head, GitHub creates the
|
# If downloaded from the head, GitHub creates the
|
||||||
# zip file with all files dated from the last
|
# zip file with all files dated from the last
|
||||||
@ -28,7 +28,7 @@ fi
|
|||||||
if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
|
if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
|
||||||
# generate the version info based on the tag
|
# generate the version info based on the tag
|
||||||
release=`(git describe --tags || git --describe || git describe --all --long) \
|
release=`(git describe --tags || git --describe || git describe --all --long) \
|
||||||
2>/dev/null | tr -d '\n'`
|
2>/dev/null | tr -s '/' '-' | tr -d '\n'`
|
||||||
|
|
||||||
# Are there uncommitted changes?
|
# Are there uncommitted changes?
|
||||||
git update-index --refresh --unmerged > /dev/null
|
git update-index --refresh --unmerged > /dev/null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user