Commit ba75594a authored by François Bobot's avatar François Bobot
Browse files

Use instead commandline argument

parent 0d55e085
Pipeline #23430 passed with stage
in 37 seconds
......@@ -23,7 +23,7 @@ test:
#- ./generate ../assets/Changelog -o ../html/changelog.html
- cd ..
- bundle exec jekyll build -d test
- cd test; bundle exec ruby ../rewrite_url_download.rb
- bundle exec ruby rewrite_url_download.rb test/
artifacts:
paths:
- test
......@@ -40,7 +40,7 @@ pages:
#- ./generate ../assets/Changelog -o ../html/changelog.html
- cd ..
- bundle exec jekyll build -d public
- cd public; bundle exec ruby ../rewrite_url_download.rb
- bundle exec ruby rewrite_url_download.rb public/
artifacts:
paths:
- public
......
......@@ -2,7 +2,7 @@ require 'cgi'
require 'rubygems' rescue nil
require 'nokogiri'
Dir.glob('**/*.html') do |file_path|
Dir.glob(ARGV[0] + '**/*.html') do |file_path|
doc = Nokogiri::HTML(open(file_path))
doc.css("a").each do |link|
next if link.attributes["href"].nil? or not link.attributes["href"].value.start_with?("/download/")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment