Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RE: disable automatic update check #3526 #3907

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions core/core-dotspacemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ banner, `random' chooses a random text banner in `core/banners'
directory. A string value must be a path to a .PNG file.
If the value is nil then no banner is displayed.")

(defvar dotspacemacs-version-check-enable t
"If non-nil then enable checking for new versions of spacemacs")

(defvar dotspacemacs-configuration-layers '(emacs-lisp)
"List of configuration layers to load. If it is the symbol `all' instead
of a list then all discovered layers will be installed.")
Expand Down
47 changes: 24 additions & 23 deletions core/core-release-management.el
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,30 @@ users on `develop' branch must manually pull last commits instead."
"Periodicly check for new for new Spacemacs version.
Update `spacemacs-new-version' variable if any new version has been
found."
(if (string-equal "develop" (spacemacs/git-get-current-branch))
(message "Skipping check for new version because you are on develop.")
(message "Start checking for new version...")
(async-start
`(lambda ()
,(async-inject-variables "\\`user-emacs-directory\\'")
(load-file (concat user-emacs-directory "core/core-load-paths.el"))
(require 'core-spacemacs)
(spacemacs/get-last-version))
(lambda (result)
(if result
(if (or (version< result spacemacs-version)
(string= result spacemacs-version)
(if spacemacs-new-version
(string= result spacemacs-new-version)))
(message "Spacemacs is up to date.")
(message "New version of Spacemacs available: %s" result)
(setq spacemacs-new-version result))
(message "Unable to check for new version."))))
(when interval
(setq spacemacs-version-check-timer
(run-at-time t (timer-duration interval)
'spacemacs/check-for-new-version)))))
(if (eq nil dotspacemacs-version-check-enable)
(message "Skipping check for new version because dotspacemacs-version-check-enable nil")
(if (string-equal "develop" (spacemacs/git-get-current-branch))
(message "Skipping check for new version because you are on develop.")
(message "Start checking for new version...")
(async-start
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this one line while developing

(lambda ()
(load-file (concat user-emacs-directory "core/core-load-paths.el"))
(require 'core-spacemacs)
(spacemacs/get-last-version))
(lambda (result)
(if result
(if (or (version< result spacemacs-version)
(string= result spacemacs-version)
(if spacemacs-new-version
(string= result spacemacs-new-version)))
(message "Spacemacs is up to date.")
(message "New version of Spacemacs available: %s" result)
(setq spacemacs-new-version result))
(message "Unable to check for new version."))))
(when interval
(setq spacemacs-version-check-timer
(run-at-time t (timer-duration interval)
'spacemacs/check-for-new-version))))))

(defun spacemacs/get-last-version ()
"Return the last tagged version."
Expand Down