Пофиксил баг – при очищении проекта также необходимо задавать конфигурацию
This commit is contained in:
parent
c4631e1805
commit
0a3d0773fb
|
|
@ -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)
|
||||
instruments.CreateOrRestoreFromBackup(sln_dir, bc['files_for_backup'])
|
||||
instruments.DeleteBackups(sln_dir, bc['files_for_backup'])
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue