Respect 80 chars per line in core-release-management.el
This commit is contained in:
parent
265faecbba
commit
d3ae04b29c
|
@ -50,16 +50,21 @@ users on `develop' branch must manually pull last commits instead."
|
||||||
(format "Version (default %s [latest]): " last-version)
|
(format "Version (default %s [latest]): " last-version)
|
||||||
nil nil last-version))))
|
nil nil last-version))))
|
||||||
(cond ((string-equal "develop" branch)
|
(cond ((string-equal "develop" branch)
|
||||||
(message (concat "Cannot switch version because you are on develop.\n"
|
(message (concat "Cannot switch version because you are on "
|
||||||
"You have to manually `pull --rebase' the latest commits.")))
|
"develop.\n"
|
||||||
|
"You have to manually `pull --rebase' the latest "
|
||||||
|
"commits.")))
|
||||||
(dirty
|
(dirty
|
||||||
(message "Your Emacs directory is not clean.\ngit status:\n%s" dirty))
|
(message (concat "Your Emacs directory is not clean.\n"
|
||||||
|
"git status:\n%s") dirty))
|
||||||
((string-equal version spacemacs-version)
|
((string-equal version spacemacs-version)
|
||||||
(message "You are already on the latest version."))
|
(message "You are already on the latest version."))
|
||||||
((or (string-equal "master" branch)
|
((or (string-equal "master" branch)
|
||||||
(yes-or-no-p
|
(yes-or-no-p
|
||||||
(format (concat "You are not on master. This command will switch branches.\n"
|
(format (concat "You are not on master. "
|
||||||
"Are you sure that you want to switch to version %s ? ")
|
"This command will switch branches.\n"
|
||||||
|
"Are you sure that you want to switch "
|
||||||
|
"to version %s ? ")
|
||||||
version)))
|
version)))
|
||||||
(let ((tag (concat "v" version)))
|
(let ((tag (concat "v" version)))
|
||||||
(if (spacemacs/git-hard-reset-to-tag tag)
|
(if (spacemacs/git-hard-reset-to-tag tag)
|
||||||
|
@ -68,8 +73,7 @@ users on `develop' branch must manually pull last commits instead."
|
||||||
(message "Succesfully switched to version %s" version))
|
(message "Succesfully switched to version %s" version))
|
||||||
(message "An error occurred while switching to version %s"
|
(message "An error occurred while switching to version %s"
|
||||||
version))))
|
version))))
|
||||||
(t
|
(t (message "Update aborted.")))))
|
||||||
(message "Update aborted.")))))
|
|
||||||
|
|
||||||
(defun spacemacs/check-for-new-version (&optional interval)
|
(defun spacemacs/check-for-new-version (&optional interval)
|
||||||
"Periodicly check for new for new Spacemacs version.
|
"Periodicly check for new for new Spacemacs version.
|
||||||
|
@ -86,7 +90,8 @@ found."
|
||||||
(async-start
|
(async-start
|
||||||
`(lambda ()
|
`(lambda ()
|
||||||
,(async-inject-variables "\\`spacemacs-start-directory\\'")
|
,(async-inject-variables "\\`spacemacs-start-directory\\'")
|
||||||
(load-file (concat spacemacs-start-directory "core/core-load-paths.el"))
|
(load-file (concat spacemacs-start-directory
|
||||||
|
"core/core-load-paths.el"))
|
||||||
(require 'core-spacemacs)
|
(require 'core-spacemacs)
|
||||||
(spacemacs/get-last-version))
|
(spacemacs/get-last-version))
|
||||||
(lambda (result)
|
(lambda (result)
|
||||||
|
@ -103,9 +108,7 @@ found."
|
||||||
(setq spacemacs-version-check-timer
|
(setq spacemacs-version-check-timer
|
||||||
(run-at-time t (timer-duration interval)
|
(run-at-time t (timer-duration interval)
|
||||||
'spacemacs/check-for-new-version))))
|
'spacemacs/check-for-new-version))))
|
||||||
(t
|
(t (message "Skipping check for new version (reason: async not loaded)"))))
|
||||||
(message "Skipping check for new version (reason: async not loaded)"))
|
|
||||||
))
|
|
||||||
|
|
||||||
(defun spacemacs/get-last-version ()
|
(defun spacemacs/get-last-version ()
|
||||||
"Return the last tagged version."
|
"Return the last tagged version."
|
||||||
|
|
Loading…
Reference in a new issue