mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
refactor(cli): s/doom-cli-sync-info-file/doom-sync-info-file
To conform to new naming conventions.
This commit is contained in:
@ -14,7 +14,8 @@
|
|||||||
(defvar doom-before-sync-hook ()
|
(defvar doom-before-sync-hook ()
|
||||||
"Hooks run before 'doom sync' synchronizes the user's config with Doom.")
|
"Hooks run before 'doom sync' synchronizes the user's config with Doom.")
|
||||||
|
|
||||||
(defvar doom-cli-sync-info-file (file-name-concat doom-profile-data-dir "sync"))
|
;; DEPRECATED: Will be removed once `doom-profile' is a struct
|
||||||
|
(defvar doom-sync-info-file (file-name-concat doom-profile-data-dir "sync"))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
@ -74,7 +75,7 @@ OPTIONS:
|
|||||||
;; necessarily back/forward compatible across major versions, and many
|
;; necessarily back/forward compatible across major versions, and many
|
||||||
;; packages bake in hardcoded data at compile-time.
|
;; packages bake in hardcoded data at compile-time.
|
||||||
(pcase-let ((`(,old-version . ,hash)
|
(pcase-let ((`(,old-version . ,hash)
|
||||||
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
|
(doom-file-read doom-sync-info-file :by 'read :noerror t))
|
||||||
(to-rebuild nil))
|
(to-rebuild nil))
|
||||||
(when (and old-version (not (equal old-version emacs-version)))
|
(when (and old-version (not (equal old-version emacs-version)))
|
||||||
(print! (warn "Emacs version has changed since last sync (from %s to %s)") old-version emacs-version)
|
(print! (warn "Emacs version has changed since last sync (from %s to %s)") old-version emacs-version)
|
||||||
@ -101,8 +102,8 @@ OPTIONS:
|
|||||||
(when (doom-profile-generate)
|
(when (doom-profile-generate)
|
||||||
(print! (item "Restart Emacs for changes to take effect"))
|
(print! (item "Restart Emacs for changes to take effect"))
|
||||||
(run-hooks 'doom-after-sync-hook))
|
(run-hooks 'doom-after-sync-hook))
|
||||||
(when (or rebuild? (not (file-exists-p doom-cli-sync-info-file)))
|
(when (or rebuild? (not (file-exists-p doom-sync-info-file)))
|
||||||
(with-temp-file doom-cli-sync-info-file
|
(with-temp-file doom-sync-info-file
|
||||||
(prin1 (cons emacs-version (doom-sync--system-hash))
|
(prin1 (cons emacs-version (doom-sync--system-hash))
|
||||||
(current-buffer))))
|
(current-buffer))))
|
||||||
t)
|
t)
|
||||||
|
Reference in New Issue
Block a user