summaryrefslogtreecommitdiff
path: root/findversion.sh
diff options
context:
space:
mode:
authorfrosch <github@elsenhans.name>2019-03-03 20:08:28 +0100
committerGitHub <noreply@github.com>2019-03-03 20:08:28 +0100
commit39cda89e858325cf4c8b76a78566d96294d95b43 (patch)
treed92131ebdaf320c5c43767f62a265a439c297529 /findversion.sh
parent8016b8b3e9f0e1c0190a3dba74ba4d02ed6053c1 (diff)
downloadopenttd-39cda89e858325cf4c8b76a78566d96294d95b43.tar.xz
Add: Detect stable tags automatically, and set the 'stable' flag in '_openttd_newgrf_version' accordingly. (#7317)
Diffstat (limited to 'findversion.sh')
-rwxr-xr-xfindversion.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/findversion.sh b/findversion.sh
index 37e483cae..95a041bac 100755
--- a/findversion.sh
+++ b/findversion.sh
@@ -83,9 +83,15 @@ if [ -d "$ROOT_DIR/.git" ]; then
if [ -n "$TAG" ]; then
VERSION="${TAG}"
ISTAG="1"
+ if [ -n "`echo \"${TAG}\" | grep \"^[0-9.]*$\"`" ]; then
+ ISSTABLETAG="1"
+ else
+ ISSTABLETAG="0"
+ fi
else
VERSION="${ISODATE}-${BRANCH}${hashprefix}${SHORTHASH}"
ISTAG="0"
+ ISSTABLETAG="0"
fi
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
@@ -102,6 +108,7 @@ else
TAG=""
VERSION=""
ISTAG="0"
+ ISSTABLETAG="0"
fi
-echo "$VERSION $ISODATE $MODIFIED $HASH $ISTAG"
+echo "$VERSION $ISODATE $MODIFIED $HASH $ISTAG $ISSTABLETAG"