Skip to content

Commit

Permalink
Add internal function: `op/do-publication-1'
Browse files Browse the repository at this point in the history
`op/do-publication-1' can be used in elisp, users can
code their own publication command easily based this function.
  • Loading branch information
tumashu committed Mar 22, 2015
1 parent 0fe5a58 commit 931acd2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion org-page.el
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ then the branch `op/repository-html-branch' will be pushed to remote repo."
(u (when (and a (not p))
(y-or-n-p "Auto push to remote repo? "))))
(list f b p a u)))
(op/do-publication-1 force-all
base-git-commit pub-base-dir
auto-commit auto-push))

(defun op/do-publication-1 (force-all
base-git-commit pub-base-dir
auto-commit auto-push)
"Internal function used by `op/do-publication'"
(op/verify-configuration)
(setq op/item-cache nil)
(let* ((orig-branch (op/git-branch-name op/repository-directory))
Expand Down Expand Up @@ -124,7 +132,7 @@ files, committed by org-page.")
(op/git-change-branch op/repository-directory orig-branch))
(if to-repo
(message "Publication finished: on branch '%s' of repository '%s'."
op/repository-html-branch op/repository-directory)
op/repository-html-branch op/repository-directory)
(message "Publication finished, output directory: %s." pub-base-dir))))

(defun op/new-repository (repo-dir)
Expand Down

0 comments on commit 931acd2

Please sign in to comment.