Fix adding of variants to catalog property-list
This commit is contained in:
parent
5b1b01bb0f
commit
141be1410a
2 changed files with 19 additions and 3 deletions
|
@ -22,6 +22,10 @@ parser.add_argument("--no-update",
|
||||||
dest = "noupdate",
|
dest = "noupdate",
|
||||||
help="Disable updating from SCM source",
|
help="Disable updating from SCM source",
|
||||||
action="store_true")
|
action="store_true")
|
||||||
|
parser.add_argument("--no-upload",
|
||||||
|
dest = "noupload",
|
||||||
|
help="Disable uploading to destination server",
|
||||||
|
action="store_true")
|
||||||
parser.add_argument("dir", help="Catalog directory")
|
parser.add_argument("dir", help="Catalog directory")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
@ -75,7 +79,7 @@ def initRepositories():
|
||||||
return repositories
|
return repositories
|
||||||
|
|
||||||
def processUpload(node, outputPath):
|
def processUpload(node, outputPath):
|
||||||
if not node.getValue("enabled", True):
|
if args.noupload or not node.getValue("enabled", True):
|
||||||
print "Upload disabled"
|
print "Upload disabled"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
16
package.py
16
package.py
|
@ -15,16 +15,28 @@ class VariantData:
|
||||||
#self._primary = primary
|
#self._primary = primary
|
||||||
self._path = path
|
self._path = path
|
||||||
self._name = node.getValue("sim/description")
|
self._name = node.getValue("sim/description")
|
||||||
|
if (not self._name):
|
||||||
|
print "Missing description for " + path
|
||||||
|
self._name = "Missing description:" + self.id
|
||||||
|
|
||||||
# ratings
|
# ratings
|
||||||
|
|
||||||
# seperate thumbnails
|
# seperate thumbnails
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self):
|
||||||
|
return self._name
|
||||||
|
|
||||||
|
@property
|
||||||
|
def id(self):
|
||||||
|
return self._path[:-8] # "remove -set.xml" (8 chars)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def catalogNode(self):
|
def catalogNode(self):
|
||||||
n = sgprops.Node("variant")
|
n = sgprops.Node("variant")
|
||||||
n.addChild("id").value = self._path[:-8] # "remove -set.xml" (8 chars)
|
n.addChild("id").value = self.id
|
||||||
n.addChild("name").value = self._name
|
n.addChild("name").value = self.name
|
||||||
|
return n
|
||||||
|
|
||||||
class PackageData:
|
class PackageData:
|
||||||
def __init__(self, path, scmRepo):
|
def __init__(self, path, scmRepo):
|
||||||
|
|
Loading…
Add table
Reference in a new issue