Use atom.getReleaseChannel()

This commit is contained in:
Ben Ogle
2016-03-01 14:59:02 -08:00
parent 0b36d85bda
commit 4d11ff25d0
2 changed files with 2 additions and 13 deletions

View File

@@ -42,7 +42,7 @@ export default class AutoUpdateManager {
}
platformSupportsUpdates () {
return this.getReleaseChannel() !== 'dev' && this.getState() !== 'unsupported'
return atom.getReleaseChannel() !== 'dev' && this.getState() !== 'unsupported'
}
onDidBeginCheckingForUpdate (callback) {
@@ -70,15 +70,4 @@ export default class AutoUpdateManager {
getPlatform () {
return process.platform
}
// TODO: We should move this into atom env or something.
getReleaseChannel () {
let version = atom.getVersion()
if (version.indexOf('beta') > -1) {
return 'beta'
} else if (version.indexOf('dev') > -1) {
return 'dev'
}
return 'stable'
}
}