Bug 1253110 - Make package_re optional in artifact builds; r?mshal
Upcoming commits will introduce support for consuming a single artifact
containing all binary related files. We prepare for this by making the
package_re argument optional.
While we were here, we make the arguments named so we don't always have
to pass them.
MozReview-Commit-ID: 94EOOIc3nuA
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -120,19 +120,21 @@ class ArtifactJob(object):
('bin/xpcshell', ('bin', 'bin')),
('bin/plugins/*', ('bin/plugins', 'plugins'))
}
# We can tell our input is a test archive by this suffix, which happens to
# be the same across platforms.
_test_archive_suffix = '.common.tests.zip'
- def __init__(self, package_re, tests_re, log=None):
- self._package_re = re.compile(package_re)
+ def __init__(self, package_re=None, tests_re=None, log=None):
+ self._package_re = None
self._tests_re = None
+ if package_re:
+ self._package_re = re.compile(package_re)
if tests_re:
self._tests_re = re.compile(tests_re)
self._log = log
def log(self, *args, **kwargs):
if self._log:
self._log(*args, **kwargs)