Skip to content

Commit dca8438

Browse files
committed
Update fileutils usage
1 parent 5cd02bf commit dca8438

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

guides/_tasks/site.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
task :gen_version, [:version] do |t, args|
88
# GITHUB_REF comes from GitHub Actions
99
version = args[:version] || ENV["GITHUB_REF"] || raise("A version is required")
10+
puts "Building docs for #{version}"
1011
# GitHub Actions gives the full tag name
1112
if version.start_with?("refs/tags/")
1213
version = version[10..-1]
@@ -21,13 +22,13 @@
2122
system("rm graphql-#{version}.gem")
2223

2324
Dir.chdir("graphql-#{version}") do
24-
system("yardoc")
2525
# Copy it into gh-pages for publishing
2626
# and locally for previewing
2727
push_dest = File.expand_path("../gh-pages/api-doc/#{version}")
2828
local_dest = File.expand_path("../guides/_site/api-doc/#{version}")
29-
mkdir_p push_dest
30-
mkdir_p local_dest
29+
FileUtils.mkdir_p(push_dest)
30+
FileUtils.mkdir_p(local_dest)
31+
system("yardoc")
3132
puts "Copying from #{Dir.pwd}/doc to #{push_dest}"
3233
copy_entry "doc", push_dest
3334
puts "Copying from #{Dir.pwd}/doc to #{local_dest}"

0 commit comments

Comments
 (0)