Skip to content

Commit d127ed1

Browse files
committed
ci: try edit package version as well
1 parent 51f5e0b commit d127ed1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

test/commands/outdated_upgrade/make-outdate.el

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
(defun make-outdate-package (name)
4242
"Make package (NAME) outdate."
4343
(let* ((dir (file-name-directory (locate-library name)))
44-
(pkg (concat dir name "-pkg.el")))
44+
(pkg (concat dir name "-pkg.el"))
45+
(main (concat dir name ".el")))
4546
(with-current-buffer (find-file pkg)
4647
(goto-char (point-min))
4748
(when (re-search-forward "\"[0-9.]*\"" nil t)
@@ -55,7 +56,16 @@
5556
(let ((dest (expand-file-name (concat name "-" make-outdate-version "/") package-user-dir)))
5657
(eask-info "Moving %s" dir)
5758
(eask-info " to %s" dest)
58-
(mo--move-path dir dest))))
59+
(mo--move-path dir dest))
60+
(with-current-buffer (find-file main)
61+
(when (re-search-forward "Package-Version: [0-9.]*" nil t)
62+
(save-excursion
63+
(let ((end (point)))
64+
(backward-sexp)
65+
(delete-region (point) end)
66+
(insert (format "%s" make-outdate-version)))))
67+
(save-buffer)
68+
(kill-this-buffer))))
5969

6070
(make-outdate-package "dash")
6171
(make-outdate-package "f")

0 commit comments

Comments
 (0)