mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-22 08:36:30 +00:00
Extend label schema (#200)
* Update build.py * Update build.py * fix lint
This commit is contained in:
parent
d56af22d5e
commit
c02f6913b3
@ -38,11 +38,9 @@ class AddonBuild(JsonConfig):
|
|||||||
|
|
||||||
def get_docker_args(self, version):
|
def get_docker_args(self, version):
|
||||||
"""Create a dict with docker build arguments."""
|
"""Create a dict with docker build arguments."""
|
||||||
build_tag = "{}:{}".format(self.addon.image, version)
|
args = {
|
||||||
|
|
||||||
return {
|
|
||||||
'path': str(self.addon.path_location),
|
'path': str(self.addon.path_location),
|
||||||
'tag': build_tag,
|
'tag': "{}:{}".format(self.addon.image, version),
|
||||||
'pull': True,
|
'pull': True,
|
||||||
'forcerm': True,
|
'forcerm': True,
|
||||||
'squash': self.squash,
|
'squash': self.squash,
|
||||||
@ -50,6 +48,8 @@ class AddonBuild(JsonConfig):
|
|||||||
'io.hass.version': version,
|
'io.hass.version': version,
|
||||||
'io.hass.arch': self.config.arch,
|
'io.hass.arch': self.config.arch,
|
||||||
'io.hass.type': META_ADDON,
|
'io.hass.type': META_ADDON,
|
||||||
|
'io.hass.name': self.addon.name,
|
||||||
|
'io.hass.description': self.addon.description,
|
||||||
},
|
},
|
||||||
'buildargs': {
|
'buildargs': {
|
||||||
'BUILD_FROM': self.base_image,
|
'BUILD_FROM': self.base_image,
|
||||||
@ -58,3 +58,8 @@ class AddonBuild(JsonConfig):
|
|||||||
**self.additional_args,
|
**self.additional_args,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.addon.url:
|
||||||
|
args['labels']['io.hass.url'] = self.addon.url
|
||||||
|
|
||||||
|
return args
|
||||||
|
Loading…
x
Reference in New Issue
Block a user