Add function to list package versions and freeze versions in test script

This commit is contained in:
Jason TIAN 2023-05-16 21:04:44 +08:00
parent c45af99a58
commit 36bcbe24e4
2 changed files with 22 additions and 0 deletions

View file

@ -25,6 +25,14 @@
;; to prevent kill and yank commands from accessing the clipboard
(setq x-select-enable-clipboard nil)
(defun my/list-packages-and-versions ()
(interactive)
(package-initialize)
(let ((pkgs (mapcar 'car package-alist)))
(dolist (pkg pkgs)
(message "%s - %s"
pkg (package-desc-version (cadr (assq pkg package-alist)))))))
(defun my/copy-org-id-at-point ()
"Copy the ID property of the heading at point to the kill-ring."
(interactive)

View file

@ -9,5 +9,19 @@ ${EMACS:=emacs} -nw --batch \
(user-init-file (expand-file-name "init.el"))
(load-path (delq default-directory load-path)))
(load-file user-init-file)
(my/list-packages-and-versions)
(straight-freeze-versions)
(run-hooks (quote after-init-hook))))'
ls -lrt ./straight/versions
directory="./straight/versions"
for file in "$directory"/*
do
if [ -f "$file" ]; then
cat "$file"
echo "-------------------"
fi
done
echo "Startup successful"