|
|
@ -23,6 +23,7 @@ from calculate.lib.datavars import (Variable, VariableError, |
|
|
|
SimpleDataVars, DataVarsError) |
|
|
|
from calculate.lib.utils.files import readFile, \ |
|
|
|
listDirectory, process, pathJoin |
|
|
|
from calculate.lib.utils.git import Git |
|
|
|
|
|
|
|
from calculate.lib.configparser import ConfigParser |
|
|
|
from calculate.lib.cl_lang import setLocalTranslate |
|
|
@ -206,7 +207,7 @@ class VariableClUpdateRepRev(Variable): |
|
|
|
for repname, branchname in zip( |
|
|
|
self.Get('cl_update_rep_name'), |
|
|
|
self.Get('cl_update_branch_name')): |
|
|
|
if branchname == "binhost": |
|
|
|
if branchname == Git.Reference.Tag: |
|
|
|
yield cp.get("vcs", repname, fallback=branch) |
|
|
|
else: |
|
|
|
yield branchname |
|
|
@ -217,7 +218,7 @@ class VariableClUpdateBranch(Variable): |
|
|
|
""" |
|
|
|
Ветка на которую будет обновляться репозиторий если -getbinpkg |
|
|
|
""" |
|
|
|
value = "master" |
|
|
|
value = Git.Reference.Master |
|
|
|
|
|
|
|
class VariableClUpdateBranchData(TableVariable): |
|
|
|
""" |
|
|
@ -337,8 +338,8 @@ class VariableClUpdateBinhostRecheckSet(Variable): |
|
|
|
opt = ["--recheck-binhost"] |
|
|
|
|
|
|
|
def init(self): |
|
|
|
self.help = _("re-check binary hosts") |
|
|
|
self.label = _("Re-check binary hosts") |
|
|
|
self.help = _("re-check most relevant update server") |
|
|
|
self.label = _("Re-check most relevant update server") |
|
|
|
|
|
|
|
|
|
|
|
class VariableClUpdateBinhostHost(FieldValue, ReadonlyVariable): |
|
|
@ -376,11 +377,15 @@ class VariableClUpdateBranchName(Variable): |
|
|
|
self.label = _("Branches") |
|
|
|
|
|
|
|
def choice(self): |
|
|
|
return ["master", "develop", "update", "binhost"] |
|
|
|
return [ |
|
|
|
Git.Reference.Tag, |
|
|
|
Git.Reference.Master, |
|
|
|
Git.Reference.Develop, |
|
|
|
Git.Reference.Update] |
|
|
|
|
|
|
|
def get(self): |
|
|
|
if "getbinpkg" in self.Get('cl_features'): |
|
|
|
return ["binhost" for x in self.Get('cl_update_rep_name')] |
|
|
|
return [Git.Reference.Tag for x in self.Get('cl_update_rep_name')] |
|
|
|
else: |
|
|
|
branch = self.Get('cl_update_branch') |
|
|
|
return [branch for x in self.Get('cl_update_rep_name')] |
|
|
|