Добавил команду копирования файлов
This commit is contained in:
parent
0c1c6b5919
commit
b36229422d
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue