Skip to content

Commit 3964f22

Browse files
author
ebembi-crdb
committed
Clean up archive-v20.2 branch
- Remove LLM-generated openssl_fix.rb script - Remove debug files (error.log, output.txt) - Update sidebar_htmltest.rb to respect htmltest config and skip archived versions This addresses issues similar to those found in PR #21195 for v2.1: - Removes SSL workaround script that doesn't belong in src/current - Removes accidentally committed build artifacts - Ensures htmltest skips archived versions during validation
1 parent 7cd1c3d commit 3964f22

File tree

4 files changed

+21
-13013
lines changed

4 files changed

+21
-13013
lines changed

src/current/_plugins/sidebar_htmltest.rb

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
11
require 'json'
22
require 'liquid'
3+
require 'yaml'
34

45
module SidebarHTMLTest
56
class Generator < Jekyll::Generator
67
def generate(site)
78
@site = site
89

10+
# Read htmltest configuration to get ignored directories
11+
htmltest_config = YAML.load_file('.htmltest.yml') rescue {}
12+
ignored_dirs = htmltest_config['IgnoreDirs'] || []
13+
14+
# Extract version numbers from ignored directories
15+
ignored_versions = ignored_dirs.map do |dir|
16+
match = dir.match(/\^?docs\/?(v\d+\.\d+)/)
17+
match[1] if match
18+
end.compact
19+
920
Dir[File.join(site.config['includes_dir'], 'sidebar-data-v*.json')].each do |f|
1021
next unless !!site.config['cockroachcloud'] == f.include?('cockroachcloud')
22+
23+
# Extract version from filename
24+
version = f.match(/sidebar-data-(v\d+\.\d+)/)[1]
25+
26+
# Skip if this version is in the ignored list
27+
if ignored_versions.include?(version)
28+
Jekyll.logger.info "SidebarHTMLTest:", "Skipping ignored version #{version}"
29+
next
30+
end
31+
1132
partial = site.liquid_renderer.file(f).parse(File.read(f))
1233
json = partial.render!(site.site_payload, {registers: {site: site}})
13-
version = f.match(/sidebar-data-(v\d+\.\d+)/)[1]
1434
render_sidebar(json, version)
1535
end
1636
end

0 commit comments

Comments
 (0)