Merge branch 'BS-43'
This commit is contained in:
commit
018d02fc1f
|
|
@ -1,5 +1,3 @@
|
|||
sh echo 'IosSetupSteps.txt'
|
||||
|
||||
# restore from backup # восстанавливаем из бэкапа (исходники от сборки предыдущей конфигурации могут быть модифицированными)
|
||||
# create backup
|
||||
|
||||
|
|
@ -11,7 +9,7 @@ inside 'BuildSample/BuildSample/CoolApp.csproj' set OutputPath to 'Output' for '
|
|||
inside 'BuildSample/BuildSample/CoolApp.csproj' set AssemblyName to '{@assembly_name}' for ''
|
||||
|
||||
inside 'BuildSample/BuildSample/Info.plist' set CFBundleVersion to '{@version}'
|
||||
inside 'BuildSample/BuildSample/Info.plist' set CFBundleDisplayName to 'CoolApp'
|
||||
inside 'BuildSample/BuildSample/Info.plist' set CFBundleDisplayName to '{@project_name}'
|
||||
|
||||
inside 'BuildSample/BuildSample/Info.plist' set CFBundleIconFiles with values '{@icons}'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
sh echo 'IosSteps.txt'
|
||||
sh echo '{@builder_path}'
|
||||
|
||||
<include 'scripts/{@setup_steps}'>
|
||||
|
||||
sh echo hello from '{@author}'
|
||||
sh echo version: '{@version}'
|
||||
|
||||
clean 'BuildSample/BuildSample.sln' for '{@sln_config}'
|
||||
build 'BuildSample/BuildSample.sln' for '{@sln_config}'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,46 @@
|
|||
import os
|
||||
from commands.CopyCommand import CopyCommand
|
||||
from parsers.CopyParser.CopyArguments import CopyArguments
|
||||
from parsers.InstallProfileParser import InstallProfileParser
|
||||
|
||||
|
||||
class InstallProfileCommandBuilder:
|
||||
def __init__(self):
|
||||
pass
|
||||
def __init__(self, profileFilePrefix):
|
||||
assert profileFilePrefix is not None
|
||||
|
||||
self.profileFilePrefix = profileFilePrefix
|
||||
self.profileStorageDir = '~/Library/MobileDevice/Provisioning Profiles/'
|
||||
|
||||
def isInstallProfile(self, line):
|
||||
assert line is not None
|
||||
|
||||
return line.startswith('install profile')
|
||||
parser = InstallProfileParser()
|
||||
isValid = parser.isValidLine(line)
|
||||
|
||||
return isValid
|
||||
|
||||
def getCommandFor(self, line):
|
||||
assert line is not None
|
||||
|
||||
|
||||
parser = InstallProfileParser()
|
||||
cpArgs = parser.parseLine(line)
|
||||
|
||||
srcPath = parser.parseLine(line)
|
||||
dstPath = self.getDestinationPath(srcPath)
|
||||
|
||||
cpArgs = CopyArguments()
|
||||
cpArgs.setArguments(srcPath, dstPath)
|
||||
|
||||
command = CopyCommand(cpArgs)
|
||||
return command
|
||||
|
||||
def getDestinationPath(self, sourcePath):
|
||||
dstProfileFileName = self.fetchDstFileName(sourcePath)
|
||||
dstProfilePath = os.path.join(self.profileStorageDir, dstProfileFileName)
|
||||
|
||||
return dstProfilePath
|
||||
|
||||
def fetchDstFileName(self, srcFilePath):
|
||||
profileFileName = os.path.basename(srcFilePath)
|
||||
profileFileName = '{0}.{1}'.format(self.profileFilePrefix, profileFileName)
|
||||
|
||||
return profileFileName
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ class StepsRunner:
|
|||
self.patchInfoPlistArray = PatchInfoPlistArrayCommandBuilder()
|
||||
self.copyBuilder = CopyCommandBuilder()
|
||||
self.testflightBuilder = TestflightCommandBuilder()
|
||||
self.installProfileBuilder = InstallProfileCommandBuilder()
|
||||
|
||||
profilePrefix = config['project_name']
|
||||
self.installProfileBuilder = InstallProfileCommandBuilder(profilePrefix)
|
||||
|
||||
buildUtilPath = config['build_tool']
|
||||
self.cleanBuilder = CleanBuildCommandBuilder(buildUtilPath, 'clean')
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from CommandBuilders.InstallProfileCommandBuilder import InstallProfileCommandBu
|
|||
|
||||
line = "install profile 'BuildSample/BuildSample/Profiles/8F606DAE-F9C9-4A19-8EFF-34B990D76C28.mobileprovision'"
|
||||
|
||||
builder = InstallProfileCommandBuilder()
|
||||
builder = InstallProfileCommandBuilder('BsProject')
|
||||
command = builder.getCommandFor(line)
|
||||
|
||||
command.execute()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import unittest
|
||||
from CommandBuilders.InstallProfileCommandBuilder import InstallProfileCommandBuilder
|
||||
|
||||
|
||||
class TestInstallProfileBuilder(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.prefix = 'MyProject'
|
||||
self.builder = InstallProfileCommandBuilder(self.prefix)
|
||||
|
||||
def test_dstFileName(self):
|
||||
dstFileName = self.builder.fetchDstFileName('/Some/Path/MyProfile.ext')
|
||||
self.assertEqual(dstFileName, '{0}.MyProfile.ext'.format(self.prefix))
|
||||
|
||||
def test_dstPath(self):
|
||||
dstPath = self.builder.getDestinationPath('/Some/Path/MyProfile.ext')
|
||||
self.assertEqual('~/Library/MobileDevice/Provisioning Profiles/{0}.MyProfile.ext'.format(self.prefix), dstPath)
|
||||
|
|
@ -8,7 +8,6 @@ class TestInstallProfile(unittest.TestCase):
|
|||
|
||||
def test_parse(self):
|
||||
line = "install profile 'Path/To/Profile.mobileprovision'"
|
||||
copyArgs = self.parser.parseLine(line)
|
||||
src = self.parser.parseLine(line)
|
||||
|
||||
self.assertEqual('Path/To/Profile.mobileprovision', copyArgs.source)
|
||||
self.assertEqual('~/Library/MobileDevice/Provisioning Profiles/Profile.mobileprovision', copyArgs.target)
|
||||
self.assertEqual('Path/To/Profile.mobileprovision', src)
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import re
|
||||
|
||||
from parsers.LineParser import LineParser
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class CleanBuildParser(LineParser):
|
||||
|
|
@ -8,7 +9,7 @@ class CleanBuildParser(LineParser):
|
|||
LineParser.__init__(self)
|
||||
assert commandToken is not None
|
||||
|
||||
self.__commandToken = commandToken
|
||||
self.commandToken = commandToken
|
||||
|
||||
def parseLine(self, line):
|
||||
assert line is not None
|
||||
|
|
@ -16,7 +17,8 @@ class CleanBuildParser(LineParser):
|
|||
filePathRegexp = r"'(?P<path>[./ a-zA-Z]+\.sln)'"
|
||||
slnConfigRegexp = r"'(?P<config>[a-zA-Z|]+)'$"
|
||||
|
||||
regexpSource = self.startsWith(self.__commandToken) + filePathRegexp + self.keywordToken('for') + slnConfigRegexp
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = rb.startsWith(self.commandToken) + filePathRegexp + rb.keywordToken('for') + slnConfigRegexp
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
@ -30,5 +32,5 @@ class CleanBuildParser(LineParser):
|
|||
def isValidLine(self, line):
|
||||
assert line is not None
|
||||
|
||||
isValid = line.startswith(self.__commandToken)
|
||||
isValid = line.startswith(self.commandToken)
|
||||
return isValid
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import re
|
|||
|
||||
from parsers.CopyParser.CopyArguments import CopyArguments
|
||||
from parsers.LineParser import LineParser
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class CopyLineParser(LineParser):
|
||||
|
|
@ -15,7 +16,8 @@ class CopyLineParser(LineParser):
|
|||
srcFileNameRegexp = r"'(?P<src>[^']+)'"
|
||||
dstFileNameRegexp = r"'(?P<dst>[^']+)'$"
|
||||
|
||||
regexpSource = self.startsWith('copy') + srcFileNameRegexp + self.keywordToken('to') + dstFileNameRegexp
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = rb.startsWith('copy') + srcFileNameRegexp + rb.keywordToken('to') + dstFileNameRegexp
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import re
|
||||
from parsers.InsideParser.InsideParserBase import InsideParserBase
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class InsideCsprojSetParser(InsideParserBase):
|
||||
|
|
@ -23,8 +24,9 @@ class InsideCsprojSetParser(InsideParserBase):
|
|||
valueRegexp = r"'(?P<value>[^']+)'"
|
||||
slnConfigRegexp = r"'(?P<config>[a-zA-Z|]*)'$"
|
||||
|
||||
regexpSource = self.startsWith('inside') + self.filePathRegexp + self.keywordToken('set') + keyRegexp + \
|
||||
self.keywordToken('to') + valueRegexp + self.keywordToken('for') + slnConfigRegexp
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = rb.startsWith('inside') + self.filePathRegexp + rb.keywordToken('set') + keyRegexp + \
|
||||
rb.keywordToken('to') + valueRegexp + rb.keywordToken('for') + slnConfigRegexp
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@ import abc
|
|||
from parsers.LineParser import LineParser
|
||||
|
||||
|
||||
class InsideParserBase(object, LineParser):
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
class InsideParserBase(LineParser):
|
||||
def __init__(self, fileExt):
|
||||
LineParser.__init__(self)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import re
|
||||
from parsers.InsideParser.InsideParserBase import InsideParserBase
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class InsideRemoveParser(InsideParserBase):
|
||||
|
|
@ -20,7 +21,9 @@ class InsideRemoveParser(InsideParserBase):
|
|||
filePathRegexp = r"'(?P<file>[./ a-zA-Z]+\.{0})'".format(self.fileExt)
|
||||
projectNameRegexp = r'(?P<project>[.a-zA-Z]+)'
|
||||
|
||||
regexpSource = self.startsWith('inside') + filePathRegexp + self.keywordToken('remove') + projectNameRegexp + self.spaceEndsWith('project')
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = rb.startsWith('inside') + filePathRegexp + rb.keywordToken('remove') + projectNameRegexp + \
|
||||
rb.spaceEndsWith('project')
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import re
|
||||
from parsers.InsideParser.InsideParserBase import InsideParserBase
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class InsideSetArrayParser(InsideParserBase):
|
||||
|
|
@ -25,8 +26,9 @@ class InsideSetArrayParser(InsideParserBase):
|
|||
keyRegexp = r'(?P<key>[a-zA-Z]+)'
|
||||
valueRegexp = r"'(?P<values>[^']+)'$"
|
||||
|
||||
regexpSource = self.startsWith('inside') + self.filePathRegexp + self.keywordToken('set') + keyRegexp + \
|
||||
self.keywordToken('with') + self.than('values') + valueRegexp
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = rb.startsWith('inside') + self.filePathRegexp + rb.keywordToken('set') + keyRegexp + \
|
||||
rb.keywordToken('with') + rb.than('values') + valueRegexp
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import re
|
||||
from parsers.InsideParser.InsideParserBase import InsideParserBase
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class InsideSetParser(InsideParserBase):
|
||||
|
|
@ -21,8 +22,9 @@ class InsideSetParser(InsideParserBase):
|
|||
keyRegexp = r'(?P<key>[a-zA-Z]+)'
|
||||
valueRegexp = r"'(?P<value>[^']+)'$"
|
||||
|
||||
regexpSource = self.startsWith('inside') + self.filePathRegexp + self.keywordToken('set') + keyRegexp + \
|
||||
self.keywordToken('to') + valueRegexp
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = rb.startsWith('inside') + self.filePathRegexp + rb.keywordToken('set') + keyRegexp + \
|
||||
rb.keywordToken('to') + valueRegexp
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
import re
|
||||
import os
|
||||
from parsers.CopyParser.CopyArguments import CopyArguments
|
||||
from parsers.LineParser import LineParser
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class InstallProfileParser(LineParser):
|
||||
def __init__(self):
|
||||
LineParser.__init__(self)
|
||||
self.__copyArguments = CopyArguments()
|
||||
self.__profileStorageDir = '~/Library/MobileDevice/Provisioning Profiles/'
|
||||
|
||||
def parseLine(self, line):
|
||||
assert line is not None
|
||||
|
||||
rb = RegexpBuilder()
|
||||
profilePathRegexp = r"'(?P<path>[^']+)'$"
|
||||
regexpSource = self.startsWith('install') + self.than('profile') + profilePathRegexp
|
||||
regexpSource = rb.startsWith('install') + rb.than('profile') + profilePathRegexp
|
||||
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
|
|
@ -22,13 +20,13 @@ class InstallProfileParser(LineParser):
|
|||
self._guardMatch(match, line, regexpSource)
|
||||
|
||||
srcPath = match.group('path')
|
||||
dstPath = self.getDestinationPath(srcPath)
|
||||
return srcPath
|
||||
|
||||
self.__copyArguments.setArguments(srcPath, dstPath)
|
||||
return self.__copyArguments
|
||||
def isValidLine(self, line):
|
||||
rb = RegexpBuilder()
|
||||
|
||||
def getDestinationPath(self, sourcePath):
|
||||
profileFileName = os.path.basename(sourcePath)
|
||||
destination = os.path.join(self.__profileStorageDir, profileFileName)
|
||||
regexpSource = rb.startsWith('install') + rb.than('profile')
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
return destination
|
||||
match = regexp.match(line)
|
||||
return match is not None
|
||||
|
|
|
|||
|
|
@ -1,35 +1,20 @@
|
|||
import abc
|
||||
|
||||
|
||||
class LineParser:
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def parseLine(self, line):
|
||||
assert line is not None
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def isValidLine(self, line):
|
||||
assert line is not None
|
||||
return False
|
||||
|
||||
def keywordToken(self, keyword):
|
||||
assert keyword is not None
|
||||
return r'\s+' + keyword + r'\s+'
|
||||
|
||||
def startsWith(self, keyword):
|
||||
assert keyword is not None
|
||||
return r'^' + keyword + r'\s+'
|
||||
|
||||
def spaceEndsWith(self, keyword):
|
||||
assert keyword is not None
|
||||
return r'\s+' + keyword + '$'
|
||||
|
||||
def endsWith(self, keyword):
|
||||
assert keyword is not None
|
||||
return keyword + '$'
|
||||
|
||||
def than(self, keyword):
|
||||
assert keyword is not None
|
||||
return keyword + r'\s+'
|
||||
|
||||
def _guardMatch(self, match_object, source, regexpSource = None):
|
||||
if match_object is None:
|
||||
msg = 'Recognition exception: "{0}" for "{1}"'.format(source, regexpSource)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import re
|
||||
|
||||
from parsers.LineParser import LineParser
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class MakeDirsParser(LineParser):
|
||||
|
|
@ -10,7 +11,8 @@ class MakeDirsParser(LineParser):
|
|||
def parseLine(self, line):
|
||||
pathRegexp = r"'(?P<path>[^']+)'$"
|
||||
|
||||
regexpSource = self.startsWith('create dirs') + pathRegexp
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = rb.startsWith('create dirs') + pathRegexp
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import re
|
||||
|
||||
from parsers.ParserBackup.ParserBackupBase import ParserBackupBase
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class CreateBackupParser(ParserBackupBase):
|
||||
|
|
@ -10,7 +11,8 @@ class CreateBackupParser(ParserBackupBase):
|
|||
def getMatchInfo(self, line):
|
||||
assert line is not None
|
||||
|
||||
regexpSource = self.startsWith('create') + self.endsWith('backup')
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = rb.startsWith('create') + rb.endsWith('backup')
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import re
|
||||
|
||||
from parsers.ParserBackup.ParserBackupBase import ParserBackupBase
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class DeleteBackupParser(ParserBackupBase):
|
||||
|
|
@ -10,7 +11,8 @@ class DeleteBackupParser(ParserBackupBase):
|
|||
def getMatchInfo(self, line):
|
||||
assert line is not None
|
||||
|
||||
regexpSource = self.startsWith('delete') + self.endsWith('backup')
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = rb.startsWith('delete') + rb.endsWith('backup')
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import re
|
||||
|
||||
from parsers.ParserBackup.ParserBackupBase import ParserBackupBase
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class RestoreBackupParser(ParserBackupBase):
|
||||
|
|
@ -10,7 +11,8 @@ class RestoreBackupParser(ParserBackupBase):
|
|||
def getMatchInfo(self, line):
|
||||
assert line is not None
|
||||
|
||||
regexpSource = self.startsWith('restore') + self.than('from') + self.endsWith('backup')
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = rb.startsWith('restore') + rb.than('from') + rb.endsWith('backup')
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
class RegexpBuilder:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def keywordToken(self, keyword):
|
||||
assert keyword is not None
|
||||
return r'\s+' + keyword + r'\s+'
|
||||
|
||||
def startsWith(self, keyword):
|
||||
assert keyword is not None
|
||||
return r'^' + keyword + r'\s+'
|
||||
|
||||
def spaceEndsWith(self, keyword):
|
||||
assert keyword is not None
|
||||
return r'\s+' + keyword + '$'
|
||||
|
||||
def endsWith(self, keyword):
|
||||
assert keyword is not None
|
||||
return keyword + '$'
|
||||
|
||||
def than(self, keyword):
|
||||
assert keyword is not None
|
||||
return keyword + r'\s+'
|
||||
|
|
@ -26,6 +26,11 @@ class SettingsLineParser(LineParser):
|
|||
|
||||
return result
|
||||
|
||||
def isValidLine(self, line):
|
||||
assert line is not None
|
||||
|
||||
return '=' in line
|
||||
|
||||
def splitToPathAndValue(self, line):
|
||||
# some.path = some_value
|
||||
result = line.split('=')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import re
|
||||
|
||||
from parsers.LineParser import LineParser
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class ShParser(LineParser):
|
||||
|
|
@ -10,9 +11,10 @@ class ShParser(LineParser):
|
|||
def parseLine(self, line):
|
||||
assert line
|
||||
|
||||
rb = RegexpBuilder()
|
||||
cmdTextRegexp = r'(?P<text>.*)'
|
||||
|
||||
regexpSource = self.startsWith('sh') + cmdTextRegexp
|
||||
regexpSource = rb.startsWith('sh') + cmdTextRegexp
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
match = regexp.match(line)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
from parsers.LineParser import LineParser
|
||||
import re
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class TestflightParser(LineParser):
|
||||
def __init__(self):
|
||||
|
|
@ -8,15 +10,17 @@ class TestflightParser(LineParser):
|
|||
def parseLine(self, line):
|
||||
assert line is not None
|
||||
|
||||
rb = RegexpBuilder()
|
||||
|
||||
notesRegexp = r"'(?P<notes>[^']+)'"
|
||||
apiTokenRegexp = r"'(?P<api_token>[^']+)'"
|
||||
teamTokenRegexp = r"'(?P<team_token>[^']+)'"
|
||||
filePathRegexp = r"'(?P<path>[^']+)'"
|
||||
|
||||
regexpSource = self.startsWith('publish') + filePathRegexp + self.keywordToken('to') + self.than('testflight') + \
|
||||
self.than('notes') + self.than('=') + notesRegexp + \
|
||||
self.keywordToken('api_token') + self.than('=') + apiTokenRegexp + \
|
||||
self.keywordToken('team_token') + self.than('=') + teamTokenRegexp
|
||||
regexpSource = rb.startsWith('publish') + filePathRegexp + rb.keywordToken('to') + rb.than('testflight') + \
|
||||
rb.than('notes') + rb.than('=') + notesRegexp + \
|
||||
rb.keywordToken('api_token') + rb.than('=') + apiTokenRegexp + \
|
||||
rb.keywordToken('team_token') + rb.than('=') + teamTokenRegexp
|
||||
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
import re
|
||||
from parsers.LineParser import LineParser
|
||||
from parsers.RegexpBuilder import RegexpBuilder
|
||||
|
||||
|
||||
class IncludeProcessor(LineParser):
|
||||
class IncludeProcessor:
|
||||
def __init__(self):
|
||||
LineParser.__init__(self)
|
||||
pass
|
||||
|
||||
def getIncludesInfo(self, text):
|
||||
assert text is not None
|
||||
|
||||
regexpSource = '<\s*' + self.than('include') + r"'[^']+'" + '\s*>'
|
||||
rb = RegexpBuilder()
|
||||
regexpSource = '<\s*' + rb.than('include') + r"'[^']+'" + '\s*>'
|
||||
|
||||
regexp = re.compile(regexpSource, re.UNICODE)
|
||||
results = regexp.findall(text)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
build_tool='/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool'
|
||||
version=0.0.0 # комментарий в тойже строке
|
||||
configs = 'appstore, staging'
|
||||
project_name = CoolApp
|
||||
|
||||
# ios platform settings
|
||||
ios.sln_config = Release|iPhone
|
||||
|
|
@ -16,10 +17,10 @@ ios.tf_team_token = 'c5c3cf7a6dae2bea4382dfbd181a2075_Mjc4ODkwMjAxMy0wOS0yOSAxND
|
|||
# android.steps = 'scripts/AndroidSteps.txt'
|
||||
|
||||
# config settings
|
||||
ios.appstore.app_name = 'CoolApp'
|
||||
ios.appstore.app_name = {@project_name}
|
||||
ios.appstore.author = 'Rustam'
|
||||
ios.appstore.icons = 'Content/Icons/icon-iphone@2x:Content/Icons/icon-iphone'
|
||||
|
||||
ios.staging.app_name = 'CoolApp staging'
|
||||
ios.staging.app_name = '{@project_name} staging'
|
||||
ios.staging.author = 'Fedor'
|
||||
ios.staging.icons = 'Content/Icons/icon-iphone-staging@2x.png:Content/Icons/icon-iphone-staging.png'
|
||||
|
|
|
|||
Loading…
Reference in New Issue