Use git describe for doc HTML output

* Rakefile (:doc:upload):
* doc/yas-doc-helper.el: Use 'git describe' output instead of 'git
rev-parse', since it's more readable.
This commit is contained in:
Noam Postavsky
2016-12-11 19:50:08 -05:00
parent 4ef1768e81
commit 28d5496144
2 changed files with 3 additions and 7 deletions

View File

@@ -76,16 +76,12 @@ namespace :doc do
Dir.glob("doc/stylesheets/*.css").each do |file|
FileUtils.cp file, 'doc/gh-pages/stylesheets'
end
curRev = `git rev-parse --verify HEAD`.chomp()
curRev = `git describe`.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 #{curRev.chomp()}'"