Compare commits
2 commits
8b3bd7e62a
...
42be4d084d
Author | SHA1 | Date | |
---|---|---|---|
Timothy | 42be4d084d | ||
Timothy | 9dcf7cee5d |
18
publish.el
18
publish.el
|
@ -340,6 +340,7 @@ PROJECT is the current project."
|
||||||
:include ("index.org")
|
:include ("index.org")
|
||||||
:recursive nil
|
:recursive nil
|
||||||
:publishing-function org-html-publish-to-html
|
:publishing-function org-html-publish-to-html
|
||||||
|
:time-stamp-file nil
|
||||||
:headline-levels 4
|
:headline-levels 4
|
||||||
:section-numbers nil
|
:section-numbers nil
|
||||||
:with-toc nil
|
:with-toc nil
|
||||||
|
@ -355,6 +356,7 @@ PROJECT is the current project."
|
||||||
:include ("archive.org" "404.org")
|
:include ("archive.org" "404.org")
|
||||||
:recursive nil
|
:recursive nil
|
||||||
:publishing-function org-html-publish-to-html
|
:publishing-function org-html-publish-to-html
|
||||||
|
:time-stamp-file nil
|
||||||
:headline-levels 4
|
:headline-levels 4
|
||||||
:section-numbers nil
|
:section-numbers nil
|
||||||
:with-toc nil
|
:with-toc nil
|
||||||
|
@ -487,13 +489,15 @@ PROJECT is the current project."
|
||||||
(if (= html-changed-files 0)
|
(if (= html-changed-files 0)
|
||||||
(warn! "No changes to push")
|
(warn! "No changes to push")
|
||||||
(let ((default-directory html-dir))
|
(let ((default-directory html-dir))
|
||||||
(unless source-draft-p
|
(and (or source-draft-p
|
||||||
(dolist (file (mapcar #'cdr (get-unstaged-changes)))
|
(prog1 (or (not html-draft-p)
|
||||||
(when (and (file-exists-p file)
|
(git-try-command "reset" "--soft" "HEAD~1"))
|
||||||
(string-prefix-p "DRAFT-" (file-name-base file)))
|
(dolist (file (mapcar #'cdr (get-unstaged-changes)))
|
||||||
(delete-file file))))
|
(when (and (file-exists-p file)
|
||||||
(and (git-try-command "add" "-A")
|
(string-prefix-p "DRAFT-" (file-name-base file)))
|
||||||
(git-try-command "commit" (and html-draft-p "--amend") "--message" commit-message)
|
(delete-file file)))))
|
||||||
|
(git-try-command "add" "-A")
|
||||||
|
(git-try-command "commit" "--message" commit-message)
|
||||||
(git-try-command "push" (and html-draft-p "--force-with-lease"))))))
|
(git-try-command "push" (and html-draft-p "--force-with-lease"))))))
|
||||||
|
|
||||||
(section! "Finished")
|
(section! "Finished")
|
||||||
|
|
Loading…
Reference in a new issue