From 52ad92047a526d506b7ab36a39a3f108ed5ed542 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 3 Dec 2019 19:30:12 +0100 Subject: [PATCH] Fix the setup script, now it will properly set up get repository heads. --- SConstruct | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index 90cac5cc..01b8a003 100644 --- a/SConstruct +++ b/SConstruct @@ -37,11 +37,13 @@ third_party_addon_repositories = [ target_commits = {} def load_target_commits_array(): + global target_commits + if os.path.isfile('./HEADS'): with open('./HEADS', 'r') as infile: target_commits = json.load(infile) else: - target_commits = [] + target_commits = {} def save_target_commits_array(): with open('./HEADS', 'w') as outfile: @@ -160,8 +162,6 @@ def setup_addons_third_party_addons(): copy_addon_repository(rep, './game/addons/', '.' + module_clone_path) def setup_all(): - load_target_commits_array() - setup_engine() setup_modules() setup_addons() @@ -179,6 +179,8 @@ opts.Add(EnumVariable('repository_type', 'Type of repositories to clone from fir opts.Update(env) Help(opts.GenerateHelpText(env)) +load_target_commits_array() + rt = env['repository_type'] if rt == 'ssh':