mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
prevent the 'latest' tag from messing with our version
We need to use git describe in a way that only refers to vX.Y.Z style tags. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c609bc9446
commit
f252af1dd1
20 changed files with 20 additions and 20 deletions
|
@ -20,7 +20,7 @@ git submodule init
|
|||
git submodule update
|
||||
cd -
|
||||
|
||||
GITVERSION=$(cd subsurface ; git describe --abbrev=12 | sed -e 's/-g.*$// ; s/^v//')
|
||||
GITVERSION=$(cd subsurface ; git describe --match "v[0-9]*" --abbrev=12 | sed -e 's/-g.*$// ; s/^v//')
|
||||
GITREVISION=$(echo $GITVERSION | sed -e 's/.*-// ; s/.*\..*//')
|
||||
VERSION=$(echo $GITVERSION | sed -e 's/-/./')
|
||||
GITDATE=$(cd subsurface ; git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-%d)
|
||||
|
|
|
@ -84,7 +84,7 @@ mkdir -p "$BUILDROOT"/subsurface-mobile-build
|
|||
pushd "$BUILDROOT"/subsurface-mobile-build
|
||||
|
||||
# set up the Subsurface versions by hand
|
||||
GITVERSION=$(cd "$SUBSURFACE_SOURCE" ; git describe --abbrev=12)
|
||||
GITVERSION=$(cd "$SUBSURFACE_SOURCE" ; git describe --match "v[0-9]*" --abbrev=12)
|
||||
CANONICALVERSION=$(echo "$GITVERSION" | sed -e 's/-g.*$// ; s/^v//' | sed -e 's/-/./')
|
||||
MOBILEVERSION=$(grep MOBILE "$SUBSURFACE_SOURCE"/cmake/Modules/version.cmake | cut -d\" -f 2)
|
||||
echo "#define GIT_VERSION_STRING \"$GITVERSION\"" > ssrf-version.h
|
||||
|
|
|
@ -27,7 +27,7 @@ git submodule init
|
|||
git submodule update
|
||||
cd -
|
||||
|
||||
GITVERSION=$(cd subsurface ; git describe --abbrev=12 | sed -e 's/-g.*$// ; s/^v//')
|
||||
GITVERSION=$(cd subsurface ; git describe --match "v[0-9]*" --abbrev=12 | sed -e 's/-g.*$// ; s/^v//')
|
||||
GITREVISION=$(echo $GITVERSION | sed -e 's/.*-// ; s/.*\..*//')
|
||||
VERSION=$(echo $GITVERSION | sed -e 's/-/./')
|
||||
GITDATE=$(cd subsurface ; git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-%d)
|
||||
|
|
|
@ -58,7 +58,7 @@ if [ -z $QT_VERSION ] ; then
|
|||
fi
|
||||
|
||||
# set up the Subsurface versions by hand
|
||||
GITVERSION=$(cd "$SUBSURFACE_SOURCE" ; git describe --abbrev=12)
|
||||
GITVERSION=$(cd "$SUBSURFACE_SOURCE" ; git describe --match "v[0-9]*" --abbrev=12)
|
||||
CANONICALVERSION=$(echo $GITVERSION | sed -e 's/-g.*$// ; s/^v//' | sed -e 's/-/./')
|
||||
MOBILEVERSION=$(grep MOBILE "$SUBSURFACE_SOURCE"/cmake/Modules/version.cmake | cut -d\" -f 2)
|
||||
echo "#define GIT_VERSION_STRING \"$GITVERSION\"" > "$SUBSURFACE_SOURCE"/ssrf-version.h
|
||||
|
|
|
@ -21,7 +21,7 @@ git submodule init
|
|||
git submodule update
|
||||
cd -
|
||||
|
||||
GITVERSION=$(cd subsurface ; git describe --abbrev=12 | sed -e 's/-g.*$// ; s/^v//')
|
||||
GITVERSION=$(cd subsurface ; git describe --match "v[0-9]*" --abbrev=12 | sed -e 's/-g.*$// ; s/^v//')
|
||||
GITREVISION=$(echo $GITVERSION | sed -e 's/.*-// ; s/.*\..*//')
|
||||
VERSION=$(echo $GITVERSION | sed -e 's/-/./')
|
||||
GITDATE=$(cd subsurface ; git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-%d)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# this will, however, fail for plain tar balls create via git archive
|
||||
|
||||
SCRIPT_DIR="$( cd "${BASH_SOURCE%/*}" ; pwd )"
|
||||
VERSION=$(git describe --abbrev=12) || VERSION=$(cat "$SCRIPT_DIR"/../.gitversion)
|
||||
VERSION=$(git describe --match "v[0-9]*" --abbrev=12) || VERSION=$(cat "$SCRIPT_DIR"/../.gitversion)
|
||||
DATE=$(git log -1 --format="%ct" | xargs -I{} date -d @{} +%Y-%m-%d)
|
||||
if [ "$DATE" = "" ] ; then
|
||||
DATE=$(cat "$SCRIPT_DIR"/../.gitdate)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Sorry Travis, fetching the whole thing and the tags as well...
|
||||
git fetch --unshallow
|
||||
git pull --tags
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
# setup build dir on the host, not inside of the container
|
||||
mkdir -p ../subsurface-mobile-build-docker-arm
|
||||
|
|
|
@ -18,7 +18,7 @@ os=$1
|
|||
if [ $# -eq 2 ] && [ "$2" ]; then
|
||||
v0=$2
|
||||
else
|
||||
cmd="git describe --abbrev=12"
|
||||
cmd="git describe --match "v[0-9]*" --abbrev=12"
|
||||
v0=$($cmd) || v0=$(cat .gitversion) || croak "odd; command '$cmd' failed"
|
||||
fi
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ unset -f popd
|
|||
# Sorry Travis, fetching the whole thing and the tags as well...
|
||||
git fetch --unshallow
|
||||
git pull --tags
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
git submodule init
|
||||
git submodule update --recursive
|
||||
|
|
|
@ -6,7 +6,7 @@ set -e
|
|||
# this gets executed by Travis when building for iOS
|
||||
# it gets started from inside the subsurface directory
|
||||
|
||||
GITVERSION=$(git describe --abbrev=12 | sed -e 's/-g.*$// ; s/^v//')
|
||||
GITVERSION=$(git describe --match "v[0-9]*" --abbrev=12 | sed -e 's/-g.*$// ; s/^v//')
|
||||
VERSION=$(echo $GITVERSION | sed -e 's/-/./')
|
||||
|
||||
echo "preparing dependencies for Subsurface-mobile ${VERSION} for iOS"
|
||||
|
|
|
@ -13,7 +13,7 @@ TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$PWD}
|
|||
git fetch --unshallow || true # if running locally, unshallow could fail
|
||||
git pull --tags
|
||||
git submodule init
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
# make sure we have libdivecomputer
|
||||
echo "Get libdivecomputer"
|
||||
|
|
|
@ -12,7 +12,7 @@ set -x
|
|||
# Sorry Travis, fetching the whole thing and the tags as well...
|
||||
git fetch --unshallow
|
||||
git pull --tags
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
export QT_ROOT=$PWD/Qt/5.9.3
|
||||
rm -rf Qt
|
||||
|
|
|
@ -16,7 +16,7 @@ export CXX=g++-5
|
|||
# Sorry Travis, fetching the whole thing and the tags as well...
|
||||
git fetch --unshallow
|
||||
git pull --tags
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
. /opt/qt510/bin/qt510-env.sh
|
||||
export QT_ROOT=/opt/qt510
|
||||
|
|
|
@ -13,7 +13,7 @@ unset -f popd
|
|||
# Sorry Travis, fetching the whole thing and the tags as well...
|
||||
git fetch --unshallow
|
||||
git pull --tags
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
# prep things so we can build for Mac
|
||||
# we have a custom built Qt some gives us just what we need, including QtWebKit
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Sorry Travis, fetching the whole thing and the tags as well...
|
||||
git fetch --unshallow
|
||||
git pull --tags
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
# Ugly, but keeps it running during the build
|
||||
docker run -v $PWD:/workspace/subsurface --name=builder -w /workspace -d ubuntu:16.04 /bin/sleep 60m
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Sorry Travis, fetching the whole thing and the tags as well...
|
||||
git fetch --unshallow
|
||||
git pull --tags
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
# Ugly, but keeps it running during the build
|
||||
docker run -v $PWD:/workspace/subsurface --name=builder -w /workspace -d opensuse:42.3 /bin/sleep 60m
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Sorry Travis, fetching the whole thing and the tags as well...
|
||||
git fetch --unshallow
|
||||
git pull --tags
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
# Ugly, but keeps it running during the build
|
||||
docker run -v $PWD:/workspace/subsurface --name=builder -w /workspace -d fedora:26 /bin/sleep 60m
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Sorry Travis, fetching the whole thing and the tags as well...
|
||||
git fetch --unshallow
|
||||
git pull --tags
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
# Ugly, but keeps it running during the build
|
||||
docker run -v $PWD:/workspace/subsurface --name=builder -w /workspace -d fedora:27 /bin/sleep 60m
|
||||
|
|
|
@ -10,7 +10,7 @@ TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$PWD}
|
|||
git fetch --unshallow || true # if running locally, unshallow could fail
|
||||
git pull --tags
|
||||
git submodule init
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
# make sure we have libdivecomputer
|
||||
echo "Get libdivecomputer"
|
||||
|
|
|
@ -6,7 +6,7 @@ set -x
|
|||
# Sorry Travis, fetching the whole thing and the tags as well...
|
||||
git fetch --unshallow
|
||||
git pull --tags
|
||||
git describe
|
||||
git describe --match "v[0-9]*"
|
||||
|
||||
# grab our own custom MXE environment
|
||||
pushd ${TRAVIS_BUILD_DIR}/..
|
||||
|
|
Loading…
Reference in a new issue