From b36229422d3277a512432faabc1d912875354c3c Mon Sep 17 00:00:00 2001 From: rzaitov Date: Fri, 1 Nov 2013 14:47:32 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D1=83=20=D0=BA=D0=BE=D0=BF?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/CommandBuilders/CopyCommandBuilder.py | 7 +------ scripts/IosSteps.txt | 2 ++ scripts/StepRunner/StepsRunner.py | 5 +++++ scripts/commands/CopyCommand.py | 7 +------ 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/scripts/CommandBuilders/CopyCommandBuilder.py b/scripts/CommandBuilders/CopyCommandBuilder.py index 475cdc8..297557f 100644 --- a/scripts/CommandBuilders/CopyCommandBuilder.py +++ b/scripts/CommandBuilders/CopyCommandBuilder.py @@ -3,11 +3,6 @@ from parser.CopyParser.CopyLineParser import CopyLineParser class CopyCommandBuilder: - def __init__(self, pathProvider): - assert pathProvider is not None - - self.__pathProvider = pathProvider - def isCopy(self, line): assert line is not None @@ -19,5 +14,5 @@ class CopyCommandBuilder: parser = CopyLineParser() cpArg = parser.parseLine(line) - command = CopyCommand(self.__pathProvider, cpArg) + command = CopyCommand(cpArg) return command diff --git a/scripts/IosSteps.txt b/scripts/IosSteps.txt index 6165035..4881122 100644 --- a/scripts/IosSteps.txt +++ b/scripts/IosSteps.txt @@ -6,6 +6,8 @@ inside 'BuildSample/BuildSample/CoolApp.csproj' set OutputPath to 'Output' inside 'BuildSample/BuildSample/Info.plist' set CFBundleVersion to '1.2.3' inside 'BuildSample/BuildSample/Info.plist' set CFBundleDisplayName to 'CoolApp' +copy 'BuildSample/BuildSample/Profiles/8F606DAE-F9C9-4A19-8EFF-34B990D76C28.mobileprovision' to '~/Library/MobileDevice/Provisioning Profiles/BuildScript.mobileprovision' + clean 'BuildSample/BuildSample.sln' for 'Release|iPhone' build 'BuildSample/BuildSample.sln' for 'Release|iPhone' diff --git a/scripts/StepRunner/StepsRunner.py b/scripts/StepRunner/StepsRunner.py index 17d61ff..33987ba 100644 --- a/scripts/StepRunner/StepsRunner.py +++ b/scripts/StepRunner/StepsRunner.py @@ -1,4 +1,5 @@ from CommandBuilders.CleanBuildCommandBuilder import CleanBuildCommandBuilder +from CommandBuilders.CopyCommandBuilder import CopyCommandBuilder from CommandBuilders.CreateBackupCommandBuilder import CreateBackupCommandBuilder from CommandBuilders.MakeDirsCommandBuilder import MakeDirsCommandBuilder from CommandBuilders.PatchCsprojCommandBuilder import PatchCsprojCommandBuilder @@ -20,6 +21,7 @@ class StepsRunner: self.createDirs = MakeDirsCommandBuilder() self.patchCsproj = PatchCsprojCommandBuilder(config, self.valueProvider) self.patchInfoPlist = PatchInfoplistCommandBuilder(self.valueProvider) + self.copyBuilder = CopyCommandBuilder() buildUtilPath = config['build_tool'] self.cleanBuilder = CleanBuildCommandBuilder(buildUtilPath, 'clean') @@ -64,6 +66,9 @@ class StepsRunner: elif self.patchInfoPlist.isPatchInfoPlist(line): cmd = self.patchInfoPlist.getCommandFor(line) cmd.execute() + elif self.copyBuilder.isCopy(line): + cmd =self.copyBuilder.getCommandFor(line) + cmd.execute() else: msg = "unrecognised step. Line: '{0}'".format(line) raise Exception(msg) \ No newline at end of file diff --git a/scripts/commands/CopyCommand.py b/scripts/commands/CopyCommand.py index daf4127..dc8dd94 100644 --- a/scripts/commands/CopyCommand.py +++ b/scripts/commands/CopyCommand.py @@ -2,11 +2,9 @@ import shutil import os class CopyCommand: - def __init__(self, pathProvider, copyArguments): - assert pathProvider is not None + def __init__(self, copyArguments): assert copyArguments is not None - self.__pathProvider = pathProvider self.__copyArguments = copyArguments def execute(self): @@ -17,9 +15,6 @@ class CopyCommand: def __expandPath(self, path): path = os.path.expanduser(path) - if not os.path.isabs(path): - path = self.__pathProvider.resolveAbsPath(path) - return path