From 6833c203a66b9bc3e6a0a05669cd829f5b819ad6 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sun, 20 Oct 2013 01:32:59 +0200 Subject: [PATCH 1/3] Make make_scmrev.h.js recognize "stable" as a stable branch. --- Source/Core/Common/make_scmrev.h.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Common/make_scmrev.h.js b/Source/Core/Common/make_scmrev.h.js index 17e59a24bb..97c68cc923 100644 --- a/Source/Core/Common/make_scmrev.h.js +++ b/Source/Core/Common/make_scmrev.h.js @@ -65,7 +65,7 @@ var gitexe = GetGitExe(); var revision = GetFirstStdOutLine(gitexe + cmd_revision); var describe = GetFirstStdOutLine(gitexe + cmd_describe); var branch = GetFirstStdOutLine(gitexe + cmd_branch); -var isMaster = +("master" == branch); +var isStable = +("master" == branch || "stable" == branch); // remove hash (and trailing "-0" if needed) from description describe = describe.replace(/(-0)?-[^-]+(-dirty)?$/, '$2'); @@ -74,7 +74,7 @@ var out_contents = "#define SCM_REV_STR \"" + revision + "\"\n" + "#define SCM_DESC_STR \"" + describe + "\"\n" + "#define SCM_BRANCH_STR \"" + branch + "\"\n" + - "#define SCM_IS_MASTER " + isMaster + "\n"; + "#define SCM_IS_MASTER " + isStable + "\n"; // check if file needs updating if (out_contents == GetFileContents(outfile)) From 680e73baa281827d133033f22c57688ab66cc2fe Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sun, 20 Oct 2013 02:14:00 +0200 Subject: [PATCH 2/3] Make CMakeLists.txt recognize "stable" as a stable branch. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c4f4d440d..798f4e6693 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -817,17 +817,17 @@ endif() ######################################## # Pre-build events: Define configuration variables and write SCM info header # -if(DOLPHIN_WC_BRANCH STREQUAL "master") - set(DOLPHIN_WC_IS_MASTER "1") +if(DOLPHIN_WC_BRANCH STREQUAL "master" OR DOLPHIN_WC_BRANCH STREQUAL "stable") + set(DOLPHIN_WC_IS_STABLE "1") else() - set(DOLPHIN_WC_IS_MASTER "0") + set(DOLPHIN_WC_IS_STABLE "0") endif() file(WRITE ${PROJECT_BINARY_DIR}/Source/Core/Common/scmrev.h "#define SCM_REV_STR \"" ${DOLPHIN_WC_REVISION} "\"\n" "#define SCM_DESC_STR \"" ${DOLPHIN_WC_DESCRIBE} "\"\n" "#define SCM_BRANCH_STR \"" ${DOLPHIN_WC_BRANCH} "\"\n" - "#define SCM_IS_MASTER " ${DOLPHIN_WC_IS_MASTER} "\n" + "#define SCM_IS_MASTER " ${DOLPHIN_WC_IS_STABLE} "\n" ) include_directories("${PROJECT_BINARY_DIR}/Source/Core/Common") From 35aa676fe7554055afcbe6dfa29d507b6d2f88ae Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Tue, 9 Jun 2015 21:06:28 +0200 Subject: [PATCH 3/3] Decide whether Dolphin is stable based on the branch name. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 798f4e6693..91071aefdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,6 @@ if (APPLE) endif() endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests) -set(DOLPHIN_IS_STABLE FALSE) # Libraries to link set(LIBS) @@ -126,7 +125,7 @@ endif() # version number set(DOLPHIN_VERSION_MAJOR "4") set(DOLPHIN_VERSION_MINOR "0") -if(DOLPHIN_IS_STABLE) +if(DOLPHIN_WC_BRANCH STREQUAL "stable") set(DOLPHIN_VERSION_PATCH "0") else() set(DOLPHIN_VERSION_PATCH ${DOLPHIN_WC_REVISION})