mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-24 15:56:40 +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!
|
||||
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
|
||||
|
||||
* Switch to glide for Go dependencies [Pablo Carranza Velez]
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"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.",
|
||||
"version": "5.1.0",
|
||||
"version": "5.1.1",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -12,7 +12,7 @@ deviceConfig = require './device-config'
|
||||
TypedError = require 'typed-error'
|
||||
osRelease = require './lib/os-release'
|
||||
semver = require 'semver'
|
||||
semverRegex = require('semver-regex')()
|
||||
semverRegex = require('semver-regex')
|
||||
|
||||
userConfig = {}
|
||||
|
||||
@ -169,7 +169,7 @@ bootstrapOrRetry = ->
|
||||
|
||||
hasDeviceApiKeySupport = (osVersion) ->
|
||||
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
|
||||
console.error('Unable to determine if device has deviceApiKey support', err, err.stack)
|
||||
false
|
||||
|
Loading…
Reference in New Issue
Block a user