class TarringStagePlugin(snapcraft.BasePlugin):
@classmethod
def schema(cls):
schema = super().schema()
schema['properties']['exclude'] = {
'type': 'array',
'minitems': 0,
'uniqueItems': True,
'items': {
'type': 'string',
},
'default': [],
}
schema['properties']['name'] = {
'type': 'string',
'default': ''
}
# The name must be specified
schema['required'].append('name')
return schema
def __init__(self, name, options, project):
super().__init__(name, options, project)
logger.warning("EXPERIMENTAL: The 'tarring_stagge' plugin's "
"functionality is under development and all features"
"are experimental.")
def enable_cross_compilation(self):
pass
def build(self):
super().build()
archive_name = self.options.name
self.run()
self.run(['tar czvf'] + archive_name + TBF_SOURCE, env=env)