auto-package-update.el icon indicating copy to clipboard operation
auto-package-update.el copied to clipboard

Add pre/post hooks or git support

Open thomasf opened this issue 10 years ago • 8 comments

I keep my packages/ dirs in local git repos for each emacs installation I use to be able to go back for troubleshooting or quickly backing out of temporarily broken packages.

Would be great to combine that with this mode in some way.

thomasf avatar Dec 19 '14 02:12 thomasf

pre and post update hooks are probably straightforward to implement.

Do you think those would be enough for your use case ?

rranelli avatar Dec 19 '14 03:12 rranelli

Yeah.,. really don't add them if no one else wants them, if no one else wants this I can just use advices.

thomasf avatar Dec 19 '14 04:12 thomasf

Alright. I will leave this open in the case someone finds the same need.

rranelli avatar Dec 19 '14 19:12 rranelli

This could be useful for me too. I have Git sub-modules for some packages where I'm tracking development versions, so I'd totally use this to auto-update them too.

andyleejordan avatar May 07 '15 04:05 andyleejordan

Ok, I will the before-update and after-update hooks when I find some time ;)

rranelli avatar May 07 '15 04:05 rranelli

Haha, sounds good :D

andyleejordan avatar May 07 '15 06:05 andyleejordan

Alright, done in 2e91e78a and 1c33c04.

@thomasf @andschwa Could you guys check if these are enough ?

Thanks !

rranelli avatar May 16 '15 15:05 rranelli

@rranelli This works perfectly for me with some way over-engineered Lisp to update my submodule(s, I thought I had more and wrote it to handle a list of them):

(add-hook 'auto-package-update-after-hook
      (lambda ()
        (--each '(("magit" "git pull upstream next"))
          (async-shell-command
           (concat "cd " (f-expand (f-join "lisp" (car it)) user-emacs-directory)
               " && " (cadr it))))))

andyleejordan avatar May 20 '15 01:05 andyleejordan