Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into end_user_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Andrews committed Apr 27, 2020
2 parents 24516f5 + 346971d commit ca9522b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ task :console do
end

namespace :rdoc do
temp_path = '/tmp/shopify-app-cli-wiki'
repo = 'https://github.com/Shopify/shopify-app-cli.wiki.git'
intermediate = 'markdown_intermediate'
file_to_doc = [
Expand Down Expand Up @@ -44,19 +43,21 @@ namespace :rdoc do

desc("Copy markdown documentation to the wiki and commit them")
task :wiki do
system("git clone --depth=1 #{repo} #{temp_path}")
FileUtils.cp(Dir[File.join(intermediate, '*.md')], "/tmp/shopify-app-cli-wiki")
Dir.chdir(temp_path) do
system('git add --all')
system('git commit -am "auto doc update"')
system('git push')
require 'tmpdir'
Dir.mktmpdir do |temp_dir|
system("git clone --depth=1 #{repo} #{temp_dir}")
FileUtils.cp(Dir[File.join(intermediate, '*.md')], temp_dir)
Dir.chdir(temp_dir) do
system('git add --all')
system('git commit -am "auto doc update"')
system('git push')
end
end
end

desc("Clean up any documentation related files")
task :cleanup do
FileUtils.rm_r(intermediate)
FileUtils.rm_rf(temp_path)
end
end

Expand Down

0 comments on commit ca9522b

Please sign in to comment.