try fix git step

This commit is contained in:
Andrei Yankovich 2021-03-30 18:24:33 +03:00
parent 8f3f95f64f
commit f81565e4e6

View File

@ -259,17 +259,7 @@ class Make(BaseModule):
def getFactory(self): def getFactory(self):
factory = super().getFactory() factory = super().getFactory()
def getPreviousStepStatus(steps): factory.addStep(
steps_status = steps.build.getStatus().getSteps()
self_status_index = steps_status.index(steps.step_status)
if self_status_index == 0:
return (None, 0)
return steps_status[self_status_index - 1].results
def doForce(steps):
return getPreviousStepStatus(steps)
factory.addSteps([
steps.Git( steps.Git(
repourl=util.Interpolate('%(prop:repository)s'), repourl=util.Interpolate('%(prop:repository)s'),
branch=util.Interpolate('%(prop:branch)s'), branch=util.Interpolate('%(prop:branch)s'),
@ -278,22 +268,10 @@ class Make(BaseModule):
submodules=True, submodules=True,
warnOnFailure=True, warnOnFailure=True,
haltOnFailure=False, haltOnFailure=False,
retryFetch=True,
name='git operations', name='git operations',
description='operations of git like pull clone fetch', description='operations of git like pull clone fetch',
),
steps.Git(
repourl=util.Interpolate('%(prop:repository)s'),
branch=util.Interpolate('%(prop:branch)s'),
mode='full',
method='clobber',
submodules=True,
name='git operations force',
doStepIf=doForce,
description='operations of git like pull clone' +
'fetch (force remove all old data)',
) )
]
) )
# factory.addStep(self.checkSupportedBuildSystems()) # factory.addStep(self.checkSupportedBuildSystems())