Skip to content

Commit 5b57a68

Browse files
committed
this relaxes things so our generated pages are unchanged but we get the benefit of making it easier to accept user generated PRs if they get ordering wrong
1 parent 66e5388 commit 5b57a68

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

scripts/tasks/docker.rake

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ namespace :docker do
22
desc 'build docker images'
33
task :build do
44
puts 'Generating static files for nginx'
5+
puts `bundle exec rake verify`
56
puts `bundle exec jekyll build`
67
rm_rf './_site/assets' # remove this if we move where our CSS live
78
puts 'Building acceptbitcoincash docker image'

verify.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ def process_section(section, validator)
5858
section_file = "_data/#{section['id']}.yml"
5959
data = SafeYAML.load_file(File.join(__dir__, section_file))
6060
websites = data['websites']
61+
6162
validate_data(validator, data, section_file, 'name', websites)
6263

63-
# Check section alphabetization
64-
validate_alphabetical(websites, 'name', section_file)
64+
# Set section alphabetization
65+
data['websites'] = websites.sort_by { |s| s['name'].downcase }
66+
File.write(File.join(__dir__, section_file), YAML.dump(data))
6567

6668
# Collect list of all images for section
6769
imgs = Dir["img/#{section['id']}/*"]
@@ -158,6 +160,7 @@ def get_validator(schema_name)
158160
validator = get_validator('websites_schema.yml')
159161

160162
sections.each do |section|
163+
161164
process_section(section, validator)
162165
end
163166

0 commit comments

Comments
 (0)