pytorch: keep latest version 1 and latest version 2

pull/2117/head
Simon Legner 1 year ago
parent 15cafae60d
commit 3789d0b523

@ -13,7 +13,7 @@ module Docs
# The id of the container `div.section` indicates the page type.
# If the id starts with `module-`, then it's an API reference,
# otherwise it is a note or design doc.
section_id = at_css('.section')['id']
section_id = at_css('.section[id], section[id]')['id']
if section_id.starts_with? 'module-'
section_id.remove('module-')
else

@ -20,86 +20,16 @@ module Docs
Licensed under the 3-clause BSD License.
HTML
version '2.1' do
version '2' do
self.release = '2.1'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '2.0' do
self.release = '2.0'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.13' do
version '1' do
self.release = '1.13'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.12' do
self.release = '1.12'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.11' do
self.release = '1.11'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.10' do
self.release = '1.10'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.9' do
self.release = '1.9.1'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.8' do
self.release = '1.8.1'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.7' do
self.release = '1.7.1'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.6' do
self.release = '1.6.0'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.5' do
self.release = '1.5.1'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.4' do
self.release = '1.4.0'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.3' do
self.release = '1.3.1'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.2' do
self.release = '1.2.0'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.1' do
self.release = '1.1.0'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
version '1.0' do
self.release = '1.0.1'
self.base_url = "https://pytorch.org/docs/#{release}/"
end
def get_latest_version(opts)
get_latest_github_release('pytorch', 'pytorch', opts)
end

Loading…
Cancel
Save