diff options
author | frosch <github@elsenhans.name> | 2019-03-03 20:08:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-03 20:08:28 +0100 |
commit | 39cda89e858325cf4c8b76a78566d96294d95b43 (patch) | |
tree | d92131ebdaf320c5c43767f62a265a439c297529 /findversion.sh | |
parent | 8016b8b3e9f0e1c0190a3dba74ba4d02ed6053c1 (diff) | |
download | openttd-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-x | findversion.sh | 9 |
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" |