mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use atom.getReleaseChannel()
This commit is contained in:
@@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user