File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ version Docurium::Version
1313desc 'Generate HTML documentation'
1414long_desc 'Generate HTML docs from a Docurium config file'
1515command :doc do |c |
16+ c . flag :for , :desc => "The version to generate" , :multiple => true
1617 c . action do |global_options , options , args |
1718 file = args . first
1819 Docurium ::CLI . doc ( file , options )
Original file line number Diff line number Diff line change @@ -119,12 +119,13 @@ def generate_doc_for(version)
119119 data
120120 end
121121
122- def generate_docs
122+ def generate_docs ( options )
123123 output_index = Rugged ::Index . new
124124 write_site ( output_index )
125125 @tf = File . expand_path ( File . join ( File . dirname ( __FILE__ ) , 'docurium' , 'layout.mustache' ) )
126126 versions = get_versions
127127 versions << 'HEAD'
128+ versions = versions & options [ :for ] unless options [ :for ] . empty?
128129 nversions = versions . size
129130 output = Queue . new
130131 pipes = { }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ class CLI
33
44 def self . doc ( idir , options )
55 doc = Docurium . new ( idir )
6- doc . generate_docs
6+ doc . generate_docs ( options )
77 end
88
99 def self . gen ( file )
You can’t perform that action at this time.
0 commit comments