mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-20 06:07:57 +00:00
Report OS variant to the API together with the OS version
Change-Type: patch Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
parent
b2a2ca0246
commit
8c59c2d768
@ -32,19 +32,23 @@ knex.init.then ->
|
||||
|
||||
bootstrap.done
|
||||
.then ->
|
||||
device.getOSVersion()
|
||||
.then (osVersion) ->
|
||||
# Let API know what version we are, and our api connection info.
|
||||
console.log('Updating supervisor version and api info')
|
||||
device.updateState(
|
||||
api_port: config.listenPort
|
||||
api_secret: secret
|
||||
os_version: osVersion
|
||||
supervisor_version: utils.supervisorVersion
|
||||
provisioning_progress: null
|
||||
provisioning_state: ''
|
||||
download_progress: null
|
||||
logs_channel: logsChannel
|
||||
Promise.join(
|
||||
device.getOSVersion()
|
||||
device.getOSVariant()
|
||||
(osVersion, osVariant) ->
|
||||
osVersion += " (#{osVariant})" if osVersion? and osVariant?
|
||||
# Let API know what version we are, and our api connection info.
|
||||
console.log('Updating supervisor version and api info')
|
||||
device.updateState(
|
||||
api_port: config.listenPort
|
||||
api_secret: secret
|
||||
os_version: osVersion
|
||||
supervisor_version: utils.supervisorVersion
|
||||
provisioning_progress: null
|
||||
provisioning_state: ''
|
||||
download_progress: null
|
||||
logs_channel: logsChannel
|
||||
)
|
||||
)
|
||||
|
||||
console.log('Starting Apps..')
|
||||
|
Loading…
Reference in New Issue
Block a user