-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Eldev
30 lines (27 loc) · 1.09 KB
/
Eldev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
; -*- mode: emacs-lisp; lexical-binding: t -*-
;; Uncomment some calls below as needed for your project.
;(eldev-use-package-archive 'gnu-elpa)
;(eldev-use-package-archive 'nongnu-elpa)
;(eldev-use-package-archive 'melpa)
(eldev-use-plugin 'autoloads)
(eldev-use-plugin 'undercover)
(eldev-defcommand tag (tag)
"Make a new tag"
:parameters "TAG"
(unless tag
(signal 'eldev-wrong-command-usage))
(let ((name "typewriter-roll-mode.el")
(buff (get-buffer-create "*output*")))
(when (< 0 (call-process "git" nil buff nil "add" "-f" "."))
(eldev-output (with-current-buffer buff (buffer-string)))
(error "Failed to add files"))
(when (< 0 (call-process "git" nil buff nil "stash"))
(eldev-output (with-current-buffer buff (buffer-string)))
(error "Failed to stash files"))
(with-temp-buffer
(insert-file-contents name)
(goto-char (point-min))
(re-search-forward tag))
(when (< 0 (call-process "git" nil buff nil "tag" tag "--sign"))
(eldev-output (with-current-buffer buff (buffer-string)))
(error "Failed to tag and sign"))))