diff --git a/scripts/buld.py b/scripts/buld.py index 6d49660..87a6dda 100644 --- a/scripts/buld.py +++ b/scripts/buld.py @@ -3,11 +3,13 @@ import os import settings import instruments -cmd_args = {'version' : '1.2.3', 'some_field' : 'some_value', 'action' : 'setup'} +cmd_args = {'version' : '1.2.3', 'some_field' : 'some_value', 'action' : 'build'} instruments.CompileConfigs(settings.build_ready_configs, cmd_args) for bc in settings.build_ready_configs: + print bc['name'] + sln_path = bc['sln_path'] sln_dir = os.path.dirname(sln_path) @@ -20,8 +22,8 @@ for bc in settings.build_ready_configs: path_function(bc) if bc['action'] == 'build': - instruments.CleanSolution(bc['mdtool'], sln_path) + instruments.CleanSolution(bc['mdtool'], sln_path, bc['sln_config']) instruments.BuildSolution(bc['mdtool'], sln_path, bc['sln_config']) - instruments.CreateOrRestoreFromBackup(sln_dir, settings.files_for_backup) - instruments.DeleteBackups(sln_dir, settings.files_for_backup) \ No newline at end of file + instruments.CreateOrRestoreFromBackup(sln_dir, bc['files_for_backup']) + instruments.DeleteBackups(sln_dir, bc['files_for_backup']) \ No newline at end of file diff --git a/scripts/instruments.py b/scripts/instruments.py index 551fab9..a9795dd 100644 --- a/scripts/instruments.py +++ b/scripts/instruments.py @@ -68,10 +68,10 @@ def RemoveProjectFromSolution(abs_path_to_sln, project_names): sln_file.truncate() sln_file.close() -def CleanSolution(mdtool, abs_path_to_sln): +def CleanSolution(mdtool, abs_path_to_sln, config): - clean_cmd_pattern = '{0} -v build "--target:Clean" {1}' - clean_cmd_text = clean_cmd_pattern.format(mdtool, abs_path_to_sln) + clean_cmd_pattern = '{0} -v build "--configuration:{1}" "--target:Clean" {2}' + clean_cmd_text = clean_cmd_pattern.format(mdtool, config, abs_path_to_sln) print(clean_cmd_text) ret_code = call(clean_cmd_text, shell=True)