From 0a3d0773fbc95648e285c0a64470fed37c250fb9 Mon Sep 17 00:00:00 2001 From: Rustam Zaitov Date: Sun, 15 Sep 2013 18:44:45 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=84=D0=B8=D0=BA=D1=81=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=B1=D0=B0=D0=B3=20=E2=80=93=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D0=BE=D1=87=D0=B8=D1=89=D0=B5=D0=BD=D0=B8=D0=B8=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B5=D0=BA=D1=82=D0=B0=20=D1=82=D0=B0=D0=BA=D0=B6=D0=B5?= =?UTF-8?q?=20=D0=BD=D0=B5=D0=BE=D0=B1=D1=85=D0=BE=D0=B4=D0=B8=D0=BC=D0=BE?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=B2=D0=B0=D1=82=D1=8C=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/buld.py | 10 ++++++---- scripts/instruments.py | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) 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)