Don't check for updates if it's a custom build.

Currently we check whether the version has the '.', the custom builds
would have commit hash as version, which doesn't contain '.'.
This commit is contained in:
Cheng Zhao
2013-06-03 22:33:04 +08:00
parent be309aba69
commit d224f3c5bd
2 changed files with 9 additions and 2 deletions

View File

@@ -50,6 +50,10 @@ class AtomApplication
@buildApplicationMenu()
@handleEvents()
# Don't check for updates if it's a custom build.
if @version.indexOf('.') isnt -1
@checkForUpdates()
if test
@runSpecs(true)
else if pathsToOpen.length > 0
@@ -100,6 +104,10 @@ class AtomApplication
setupJavaScriptArguments: ->
app.commandLine.appendSwitch 'js-flags', '--harmony_collections'
checkForUpdates: ->
autoUpdater.setAutomaticallyChecksForUpdates true
autoUpdater.checkForUpdatesInBackground()
buildApplicationMenu: (version, continueUpdate) ->
menus = []
menus.push

View File

@@ -45,9 +45,8 @@ setupCrashReporter = ->
setupAutoUpdater = ->
autoUpdater.setFeedUrl 'https://speakeasy.githubapp.com/apps/27/appcast.xml'
autoUpdater.setAutomaticallyChecksForUpdates true
autoUpdater.setAutomaticallyChecksForUpdates false
autoUpdater.setAutomaticallyDownloadsUpdates true
autoUpdater.checkForUpdatesInBackground()
parseCommandLine = ->
version = fs.readFileSync(path.join(__dirname, '..', '..', 'version'), 'utf8')