From 9d057e3c759c1d1e475d9cbd51fa44ef927006ea Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Wed, 15 Jul 2015 17:34:53 +0100 Subject: [PATCH] Bump default masterlist version branches to v0.8. --- src/backend/game/game_settings.cpp | 10 +++++----- src/gui/loot_state.cpp | 11 ++++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/backend/game/game_settings.cpp b/src/backend/game/game_settings.cpp index 6c0a6e2f..0c95ddcf 100644 --- a/src/backend/game/game_settings.cpp +++ b/src/backend/game/game_settings.cpp @@ -52,7 +52,7 @@ namespace loot { _lootFolderName = "Oblivion"; _masterFile = "Oblivion.esm"; _repositoryURL = "https://github.com/loot/oblivion.git"; - _repositoryBranch = "v0.7"; + _repositoryBranch = "v0.8"; } else if (Id() == GameSettings::tes5) { _name = "TES V: Skyrim"; @@ -60,7 +60,7 @@ namespace loot { _lootFolderName = "Skyrim"; _masterFile = "Skyrim.esm"; _repositoryURL = "https://github.com/loot/skyrim.git"; - _repositoryBranch = "v0.7"; + _repositoryBranch = "v0.8"; } else if (Id() == GameSettings::fo3) { _name = "Fallout 3"; @@ -68,7 +68,7 @@ namespace loot { _lootFolderName = "Fallout3"; _masterFile = "Fallout3.esm"; _repositoryURL = "https://github.com/loot/fallout3.git"; - _repositoryBranch = "v0.7"; + _repositoryBranch = "v0.8"; } else if (Id() == GameSettings::fonv) { _name = "Fallout: New Vegas"; @@ -76,7 +76,7 @@ namespace loot { _lootFolderName = "FalloutNV"; _masterFile = "FalloutNV.esm"; _repositoryURL = "https://github.com/loot/falloutnv.git"; - _repositoryBranch = "v0.7"; + _repositoryBranch = "v0.8"; } if (!folder.empty()) @@ -245,4 +245,4 @@ namespace YAML { return out; } -} \ No newline at end of file +} diff --git a/src/gui/loot_state.cpp b/src/gui/loot_state.cpp index 656a35ff..f9393573 100644 --- a/src/gui/loot_state.cpp +++ b/src/gui/loot_state.cpp @@ -372,7 +372,7 @@ namespace loot { for (auto &node : _settings["games"]) { if (node["url"]) { node["repo"] = node["url"]; - node["branch"] = "v0.7"; + node["branch"] = "v0.8"; node.remove("url"); } } @@ -388,9 +388,14 @@ namespace loot { for (auto &node : _settings["games"]) { GameSettings settings(node.as()); + set oldDefaultBranches({ + "master", + "v0.7", + }); + if (settings.RepoURL() == GameSettings(settings.Id()).RepoURL() - && settings.RepoBranch() == "master") { - node["branch"] = "v0.7"; + && oldDefaultBranches.count(settings.RepoBranch()) == 1) { + node["branch"] = "v0.8"; } } }