| @@ -16,10 +16,25 @@ module Docs · 15 unmodified lines |
| 16 | options[:skip_patterns] = [/\Agenerator/, /\Acpack_gen/, /\Ainclude/, /\Arelease/, /tutorial\/(\w*%20)+/] | 16 | options[:skip_patterns] = [/\Agenerator/, /\Acpack_gen/, /\Ainclude/, /\Arelease/, /tutorial\/(\w*%20)+/] |
| 17 | | 17 | |
| 18 | options[:attribution] = <<-HTML | 18 | options[:attribution] = <<-HTML |
| 19 | © 2000–2021 Kitware, Inc. and Contributors<br> | 19 | © 2000–2022 Kitware, Inc. and Contributors<br> |
| 20 | Licensed under the BSD 3-clause License. | 20 | Licensed under the BSD 3-clause License. |
| 21 | HTML | 21 | HTML |
| 22 | | 22 | |
| | 23 | version '3.24' do |
| | 24 | self.release = '3.24' |
| | 25 | self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" |
| | 26 | end |
| | 27 | |
| | 28 | version '3.23' do |
| | 29 | self.release = '3.23' |
| | 30 | self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" |
| | 31 | end |
| | 32 | |
| | 33 | version '3.22' do |
| | 34 | self.release = '3.22' |
| | 35 | self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" |
| | 36 | end |
| | 37 | |
| 23 | version '3.21' do | 38 | version '3.21' do |
| 24 | self.release = '3.21' | 39 | self.release = '3.21' |
| 25 | self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" | 40 | self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" |
| @@ -106,9 +121,8 @@ module Docs · 80 unmodified lines |
| 106 | end | 121 | end |
| 107 | | 122 | |
| 108 | def get_latest_version(opts) | 123 | def get_latest_version(opts) |
| 109 | doc = fetch_doc('https://cmake.org/documentation/', opts) | 124 | tags = get_gitlab_tags('gitlab.kitware.com', 'cmake', 'cmake', opts) |
| 110 | link = doc.at_css('.entry-content ul > li > strong > a > big') | 125 | tags[0]['name'][1..] |
| 111 | link.content.scan(/([0-9.]+)/)[0][0] | | |
| 112 | end | 126 | end |
| 113 | end | 127 | end |
| 114 | end | 128 | end |