Index: packager.py |
=================================================================== |
--- a/packager.py |
+++ b/packager.py |
@@ -22,21 +22,21 @@ import sys, os, re, codecs, subprocess, |
from StringIO import StringIO |
from chainedconfigparser import ChainedConfigParser |
import buildtools |
def getDefaultFileName(baseDir, metadata, version, ext): |
return os.path.join(baseDir, '%s-%s.%s' % (metadata.get('general', 'basename'), version, ext)) |
-def getMetadataPath(baseDir): |
- return os.path.join(baseDir, 'metadata') |
+def getMetadataPath(baseDir, type): |
+ return os.path.join(baseDir, 'metadata.%s' % type) |
-def readMetadata(baseDir): |
- return ChainedConfigParser(getMetadataPath(baseDir)) |
+def readMetadata(baseDir, type): |
+ return ChainedConfigParser(getMetadataPath(baseDir, type)) |
def getBuildNum(baseDir): |
try: |
(result, dummy) = subprocess.Popen(['hg', 'id', '-R', baseDir, '-n'], stdout=subprocess.PIPE).communicate() |
return re.sub(r'\D', '', result) |
except Exception: |
return '0' |