Реализовал реккурсивную обработку include/macro resolve
This commit is contained in:
parent
ab42433c32
commit
42863417cb
|
|
@ -12,5 +12,5 @@ sh cp -a BuildSample/BuildSample/Output/ Output/Appstore/
|
|||
|
||||
publish 'Output/Appstore/Artifacts/BuildSample-{@version}.ipa' to testflight notes = 'Hello' api_token = '{@tf_api_token}' team_token = '{@tf_team_token}'
|
||||
|
||||
restore from backup
|
||||
delete backup
|
||||
restore from backup 'BuildSample'
|
||||
delete backup 'BuildSample'
|
||||
|
|
@ -55,6 +55,6 @@ class SettingsResolver:
|
|||
|
||||
for node in resolvedDependencies:
|
||||
unresolvedSettingValue = self.settings[node.name]
|
||||
resolvedSettingValue = macroResolver.processText(unresolvedSettingValue)
|
||||
resolvedSettingValue = macroResolver.processText(unresolvedSettingValue, None)
|
||||
|
||||
self.settings[node.name] = resolvedSettingValue
|
||||
|
|
@ -2,7 +2,7 @@ class CommentRemover:
|
|||
def __init__(self):
|
||||
pass
|
||||
|
||||
def processText(self, line):
|
||||
def processText(self, line, conveyorProcessor):
|
||||
assert line is not None
|
||||
|
||||
newLine = line
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ class MacroResolver:
|
|||
self.macroProcessor = macroProcessor
|
||||
self.valueProvider = valueProvider
|
||||
|
||||
def processText(self, line):
|
||||
def processText(self, line, conveyorProcessor):
|
||||
assert line is not None
|
||||
|
||||
symbols = self.macroProcessor.getSymbols(line)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ class Stripper:
|
|||
def __init__(self):
|
||||
pass
|
||||
|
||||
def processText(self, line):
|
||||
def processText(self, line, conveyorProcessor):
|
||||
assert line is not None
|
||||
|
||||
return line.strip(' \t\n\r')
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ class TextConveyorPreprocessor:
|
|||
|
||||
self.processors.append(processor)
|
||||
|
||||
def processText(self, text):
|
||||
def processText(self, text, conveyorProcessor):
|
||||
assert text is not None
|
||||
|
||||
for processor in self.processors:
|
||||
text = processor.processText(text)
|
||||
text = processor.processText(text, conveyorProcessor)
|
||||
|
||||
return text
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ class TextInclude:
|
|||
self.includeProcessor = includeProcessor
|
||||
self.contentProvider = contentProvider
|
||||
|
||||
def processText(self, text):
|
||||
def processText(self, text, conveyorProcessor):
|
||||
assert text is not None
|
||||
includesInfo = self.includeProcessor.getIncludesInfo(text)
|
||||
|
||||
|
|
@ -15,6 +15,8 @@ class TextInclude:
|
|||
path = info[1]
|
||||
|
||||
content = self.contentProvider.fetchContent(path)
|
||||
content = conveyorProcessor.processText(content, conveyorProcessor)
|
||||
|
||||
text = text.replace(includeStatement, content)
|
||||
|
||||
return text
|
||||
|
|
@ -42,7 +42,7 @@ class StepsRunner:
|
|||
|
||||
lines = content.splitlines()
|
||||
for line in lines:
|
||||
processedLine = self.lineConveyor.processText(line)
|
||||
processedLine = self.lineConveyor.processText(line, self.lineConveyor)
|
||||
|
||||
if len(processedLine) == 0:
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class TaskRunner:
|
|||
pathToSteps = config['steps']
|
||||
|
||||
content = self.fileContentProvider.fetchContent(pathToSteps)
|
||||
content = self.textPreprocessor.processText(content)
|
||||
content = self.textPreprocessor.processText(content, self.textPreprocessor)
|
||||
|
||||
return content
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue