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:
Pablo Carranza Velez 2017-03-23 19:19:31 -03:00
parent b2a2ca0246
commit 8c59c2d768

View File

@ -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..')