[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7518cb4 075/177: rake doc:upload: check for wrong/incomple
From: |
João Távora |
Subject: |
[elpa] master 7518cb4 075/177: rake doc:upload: check for wrong/incomplete rev |
Date: |
Sat, 28 Mar 2015 15:41:01 +0000 |
branch: master
commit 7518cb46211692ecd14e774c7c3a8b5dee0c633c
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
rake doc:upload: check for wrong/incomplete rev
---
.gitignore | 1 +
Rakefile | 11 ++++++++++-
doc/yas-doc-helper.el | 12 ++++++------
3 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/.gitignore b/.gitignore
index c433a57..3ce1c40 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
authors.txt
doc/gh-pages
doc/*.html
+doc/html-revision
pkg/
extras/imported/**
!extras/imported/*/.yas-setup.el
diff --git a/Rakefile b/Rakefile
index 278120d..7300d6b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -67,7 +67,16 @@ namespace :doc do
Dir.glob("doc/images/*").each do |file|
FileUtils.cp file, 'doc/gh-pages/images'
end
- rev = `git rev-parse --verify HEAD`
+ curRev = `git rev-parse --verify HEAD`.chomp()
+ expRev = IO.read('doc/html-revision').chomp()
+ if curRev != expRev
+ raise ("The HTML rev: #{expRev},\n" +
+ "current rev: #{curRev}!\n")
+ end
+ if !system "git diff-index --quiet HEAD"
+ system "git status --untracked-files=no"
+ raise "You have uncommitted changes!"
+ end
Dir.chdir 'doc/gh-pages' do
sh "git commit -a -m 'Automatic documentation update.\n\n" +
"From #{rev.chomp()}'"
diff --git a/doc/yas-doc-helper.el b/doc/yas-doc-helper.el
index d504f67..495bf9e 100755
--- a/doc/yas-doc-helper.el
+++ b/doc/yas-doc-helper.el
@@ -114,13 +114,13 @@
;; This lets all the org files be exported to HTML with
;; `org-publish-current-project' (C-c C-e P).
-(let* ((rev (or (with-temp-buffer
- (when (eq (call-process "git" nil t nil
- "rev-parse" "--verify" "HEAD") 0)
- (buffer-string)))
- yas--version))
- (dir (if load-file-name (file-name-directory load-file-name)
+(let* ((dir (if load-file-name (file-name-directory load-file-name)
default-directory))
+ (rev (with-temp-file (expand-file-name "html-revision" dir)
+ (or (when (eq (call-process "git" nil t nil
+ "rev-parse" "--verify" "HEAD") 0)
+ (buffer-string))
+ (princ yas--version (current-buffer)))))
(proj-plist
(list
:base-directory dir :publishing-directory dir
- [elpa] master 46c378d 063/177: format args in docstrings as =code=, not /italic/, (continued)
- [elpa] master 46c378d 063/177: format args in docstrings as =code=, not /italic/, João Távora, 2015/03/28
- [elpa] master da9852a 053/177: {snippet-development, faq}.org: fixup pandoc output, João Távora, 2015/03/28
- [elpa] master a9e3035 066/177: docstring fixes, João Távora, 2015/03/28
- [elpa] master eda8330 067/177: only /italicize/ words completely in upper case, João Távora, 2015/03/28
- [elpa] master 0f8007e 071/177: Simplify: index.org no longer repeats info in the README, João Távora, 2015/03/28
- [elpa] master 6927f69 069/177: minor: README.mdown link, João Távora, 2015/03/28
- [elpa] master 0a9885e 073/177: markup suffixed variable names, eg SUBEXPth, João Távora, 2015/03/28
- [elpa] master c61f81f 070/177: Closes #439: add a faq question about redefining keys, João Távora, 2015/03/28
- [elpa] master 7d4e4aa 074/177: Closes #440: don't use `make-variable-buffer-local' for `yas--extra-modes', João Távora, 2015/03/28
- [elpa] master 582e368 072/177: minor: cosmetic fixes to manual, João Távora, 2015/03/28
- [elpa] master 7518cb4 075/177: rake doc:upload: check for wrong/incomplete rev,
João Távora <=
- [elpa] master b944cc9 078/177: fix rake doc:upload, João Távora, 2015/03/28
- [elpa] master 90e7595 081/177: yas-text export twice, João Távora, 2015/03/28
- [elpa] master 46b4a02 079/177: doc:upload stylesheets/*.css to gh-pages, João Távora, 2015/03/28
- [elpa] master 6c752a1 080/177: populate yas--exported-syms based on sym prefix, João Távora, 2015/03/28
- [elpa] master ba0b02f 082/177: Merge pull request #446 from dongxiong/patch-2, João Távora, 2015/03/28
- [elpa] master d89e837 076/177: add top level menu, minimal styling, João Távora, 2015/03/28
- [elpa] master 260ecf9 077/177: fix a faq title, João Távora, 2015/03/28
- [elpa] master 0567c93 083/177: Merge pull request #442 from npostavs/auto-export, João Távora, 2015/03/28
- [elpa] master 4916657 084/177: Use https instead of ssh for submodules access, João Távora, 2015/03/28
- [elpa] master 22773c7 087/177: add a link to the symbol reference in top menu, João Távora, 2015/03/28