History

Update CMake documentation (3.24)

Simon Legner committed 4 years ago

Commit bb640131 parent 26f7c142 files · +19 −5Browse files

Showing the changes to lib/docs (1 of 2 files). Show all

Unified · Split

lib/docs/scrapers/cmake.rb+18−4
@@ -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] = <<-HTML18 options[:attribution] = <<-HTML
19 &copy; 2000&ndash;2021 Kitware, Inc. and Contributors<br>19 &copy; 2000&ndash;2022 Kitware, Inc. and Contributors<br>
20 Licensed under the BSD 3-clause License.20 Licensed under the BSD 3-clause License.
21 HTML21 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' do38 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 end121 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 end126 end
113 end127 end
114end128end