From b94e26d6f0abb0cea1ebc043fe1b70cf7a6552a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Fri, 16 Apr 2021 17:54:25 +0200 Subject: [PATCH] Disconnect version numbers from the content of v* tags --- .github/get-type.py | 2 +- meson.build | 5 ----- meson_options.txt | 35 ----------------------------------- src/Config.template.h | 10 +++++----- 4 files changed, 6 insertions(+), 46 deletions(-) diff --git a/.github/get-type.py b/.github/get-type.py index 3f5742772..bba64a9f2 100644 --- a/.github/get-type.py +++ b/.github/get-type.py @@ -9,7 +9,7 @@ match_snapshot = re.match(r'refs/tags/snapshot-([0-9]+)', ref) if match_stable: print('::set-output name=TYPE::stable') print('::set-output name=NAME::v%s.%s.%s' % (match_stable.group(1), match_stable.group(2), match_stable.group(3))) - print('::set-output name=RELTYPECFG::%s' % base64.b64encode(('-Dignore_updates=false\t-Dversion_major=%s\t-Dversion_minor=%s\t-Dversion_build=%s' % (match_stable.group(1), match_stable.group(2), match_stable.group(3))).encode('utf-8')).decode('utf-8')) + print('::set-output name=RELTYPECFG::%s' % base64.b64encode(('-Dignore_updates=false').encode('utf-8')).decode('utf-8')) elif match_snapshot: print('::set-output name=TYPE::snapshot') print('::set-output name=NAME::snapshot-%s' % match_snapshot.group(1)) diff --git a/meson.build b/meson.build index ef89b56d1..125a9ba02 100644 --- a/meson.build +++ b/meson.build @@ -261,15 +261,10 @@ conf_data.set('PIX32OGL', get_option('ogli')) conf_data.set('BETA', get_option('beta')) conf_data.set('NO_INSTALL_CHECK', not get_option('install_check')) conf_data.set('IGNORE_UPDATES', get_option('ignore_updates')) -conf_data.set('SAVE_VERSION', get_option('version_major')) -conf_data.set('MINOR_VERSION', get_option('version_minor')) -conf_data.set('BUILD_NUM', get_option('version_build')) conf_data.set('MOD_ID', get_option('mod_id')) conf_data.set('DEBUG', get_option('debug')) conf_data.set('SNAPSHOT', get_option('snapshot')) conf_data.set('SNAPSHOT_ID', get_option('snapshot_id')) -conf_data.set('FUTURE_SAVE_VERSION', get_option('future_major')) -conf_data.set('FUTURE_MINOR_VERSION', get_option('future_minor')) conf_data.set('SERVER', '"' + get_option('server') + '"') conf_data.set('STATICSERVER', '"' + get_option('static_server') + '"') if get_option('update_server') != '' diff --git a/meson_options.txt b/meson_options.txt index d7db98ee9..1b019c964 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -41,27 +41,6 @@ option( value: false, description: 'Snapshot build' ) -option( - 'version_major', - type: 'integer', - min: 0, - value: 95, - description: 'Major version' -) -option( - 'version_minor', - type: 'integer', - min: 0, - value: 0, - description: 'Minor version' -) -option( - 'version_build', - type: 'integer', - min: 0, - value: 345, - description: 'Build number' -) option( 'snapshot_id', type: 'integer', @@ -69,20 +48,6 @@ option( value: 199, description: 'Snapshot ID, only relevant if \'snapshot\' is true' ) -option( - 'future_major', - type: 'integer', - min: 0, - value: 96, - description: 'Future major version, used for debugging and in snapshots, only relevant if at least one of \'snapshot\', \'beta\', or \'debug\' is true, or if \'mod_id\' is set' -) -option( - 'future_minor', - type: 'integer', - min: 0, - value: 0, - description: 'Future minor version, similar to \'future_major\'' -) option( 'mod_id', type: 'integer', diff --git a/src/Config.template.h b/src/Config.template.h index 52201650c..a3bc439ee 100644 --- a/src/Config.template.h +++ b/src/Config.template.h @@ -40,13 +40,13 @@ #endif //VersionInfoStart -#mesondefine SAVE_VERSION -#mesondefine MINOR_VERSION -#mesondefine BUILD_NUM +#define SAVE_VERSION 95 +#define MINOR_VERSION 0 +#define BUILD_NUM 345 #mesondefine SNAPSHOT_ID #mesondefine MOD_ID -#mesondefine FUTURE_SAVE_VERSION -#mesondefine FUTURE_MINOR_VERSION +#define FUTURE_SAVE_VERSION 96 +#define FUTURE_MINOR_VERSION 0 #if !(defined(SNAPSHOT) || defined(BETA) || defined(DEBUG) || MOD_ID > 0) #undef FUTURE_SAVE_VERSION