Skip to content

Commit

Permalink
生成するindex.htmlにバージョン番号を表示 (refs #36).
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuhito committed Sep 8, 2015
1 parent 9a8d9a3 commit 46f23f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
= Trema本
= TremaでOpenFlowプログラミング
高宮 安仁 <yasuhito@gmail.com>; 鈴木 一哉; 松井 暢之; 村木 暢哉; 山崎 泰宏
:revnumber: {revnumber}

:leveloffset: 1

Expand Down
8 changes: 7 additions & 1 deletion tasks/html.rake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ task html: 'index.html'

# rubocop:disable LineLength
file 'index.html' => ['index.adoc', 'how_does_openflow_work.adoc', 'hello_trema.adoc'] do |t|
sh "bundle exec asciidoctor -a icons=font -a toc=left -a source-highlighter=coderay -d book index.adoc --out-file #{t.name}"
revnumber = `git describe --abbrev=0`.chomp
sh %W(bundle exec asciidoctor
-a revnumber=#{revnumber}
-a icons=font
-a toc=left
-a source-highlighter=coderay
-d book index.adoc --out-file #{t.name}).join(' ')
end
# rubocop:enable LineLength

0 comments on commit 46f23f1

Please sign in to comment.