mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-25 16:31:05 +00:00
Auto-merge for PR #468 via VersionBot
Fix semver comparison for OS version when determining if the device has deviceApiKey support
This commit is contained in:
commit
95c78155c9
@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
|
|||||||
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## v5.1.1 - 2017-07-04
|
||||||
|
|
||||||
|
* Fix semver comparison for OS version when determining if the device has deviceApiKey support [Pablo Carranza Velez]
|
||||||
|
|
||||||
## v5.1.0 - 2017-07-01
|
## v5.1.0 - 2017-07-01
|
||||||
|
|
||||||
* Switch to glide for Go dependencies [Pablo Carranza Velez]
|
* Switch to glide for Go dependencies [Pablo Carranza Velez]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "resin-supervisor",
|
"name": "resin-supervisor",
|
||||||
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
|
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
|
||||||
"version": "5.1.0",
|
"version": "5.1.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -12,7 +12,7 @@ deviceConfig = require './device-config'
|
|||||||
TypedError = require 'typed-error'
|
TypedError = require 'typed-error'
|
||||||
osRelease = require './lib/os-release'
|
osRelease = require './lib/os-release'
|
||||||
semver = require 'semver'
|
semver = require 'semver'
|
||||||
semverRegex = require('semver-regex')()
|
semverRegex = require('semver-regex')
|
||||||
|
|
||||||
userConfig = {}
|
userConfig = {}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ bootstrapOrRetry = ->
|
|||||||
|
|
||||||
hasDeviceApiKeySupport = (osVersion) ->
|
hasDeviceApiKeySupport = (osVersion) ->
|
||||||
try
|
try
|
||||||
!/^Resin OS /.test(osVersion) or semver.gte(semverRegex.test(osVersion), '2.0.2')
|
!/^Resin OS /.test(osVersion) or semver.gte(semverRegex().exec(osVersion)[0], '2.0.2')
|
||||||
catch err
|
catch err
|
||||||
console.error('Unable to determine if device has deviceApiKey support', err, err.stack)
|
console.error('Unable to determine if device has deviceApiKey support', err, err.stack)
|
||||||
false
|
false
|
||||||
|
Loading…
Reference in New Issue
Block a user