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

Commit

Permalink
Add rake automation for 2.0 subrepo
Browse files Browse the repository at this point in the history
  • Loading branch information
dshevtsov committed Apr 4, 2019
1 parent 23c9f14 commit 55d8815
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
1 change: 1 addition & 0 deletions rakelib/multirepo.rake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace :multirepo do
# The last argument 'false' disables content filtering by sparse checkout.
# It covers cases when we need entire repository, not only the '/docs/' directory.
sh './scripts/docs-from-code.sh guides/m1x git@github.com:magento/devdocs-m1.git master false'
sh './scripts/docs-from-code.sh guides/v2.0 git@github.com:magento/devdocs.git 2.0 false'
end

desc 'Add multirepo docs providing shell arguments "dir=<directory where to init a repo>", "repo=<SSH URL>", "branch=<branch to checkout>", "filter=<true/false>" ("true" by default) to 1) filter content if "true" or 2) add content from the entire repository if "false".'
Expand Down
30 changes: 23 additions & 7 deletions rakelib/update.rake
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,72 @@ namespace :update do

desc 'Update MBI docs'
task :mbi do
puts 'Updating MBI docs'.magenta
puts 'Updating MBI docs:'.magenta
abort 'Cannot find the "mbi/" directory' unless Dir.exist? 'mbi'
Dir.chdir 'mbi' do
sh 'git remote -v'
sh 'git pull'
sh 'git status -sb'
end
end

desc 'Update Magento 1 docs'
task :m1 do
puts 'Updating Magento 1 docs'.magenta
puts 'Updating Magento 1 docs:'.magenta
abort 'Cannot find the "mbi/" directory' unless Dir.exist? 'guides/m1x'
Dir.chdir 'guides/m1x' do
sh 'git remote -v'
sh 'git pull'
sh 'git status -sb'
end
end

desc 'Update Page Builder docs'
task :pb do
puts 'Updating Page Builder docs'.magenta
puts 'Updating Page Builder docs:'.magenta
abort 'Cannot find the "page-builder" directory' unless Dir.exist? 'page-builder'
Dir.chdir 'page-builder' do
sh 'git remote -v'
sh 'git pull'
sh 'git status -sb'
end
end

desc 'Update MFTF docs'
task :mftf do
puts 'Updating MFTF docs'.magenta
puts 'Updating MFTF docs:'.magenta
abort 'Cannot find the "mftf" directory' unless Dir.exist? 'mftf'
Dir.chdir 'mftf' do
sh 'git remote -v'
sh 'git pull'
sh 'git status -sb'
end
end

desc 'Update Magento 2.0 docs'
task :v2_0 do
puts 'Updating Magento 2.0 docs:'.magenta
abort 'Cannot find the "guides/v2.0" directory' unless Dir.exist? 'guides/v2.0'
Dir.chdir 'guides/v2.0' do
sh 'git remote -v'
sh 'git checkout 2.0'
sh 'git pull'
sh 'git status -sb'
end
end

desc 'Update devdocs master'
task :devdocs do
puts 'Updating devdocs'.magenta
puts 'Updating devdocs:'.magenta
sh 'git remote -v'
sh 'git checkout master'
sh 'git pull'
sh 'git status'
sh 'git status -sb'
end

desc 'Update devodcs and subrepositories'
task all: %w[devdocs subrepos]

desc 'Update subrepositories only'
task subrepos: %w[m1 mbi pb mftf]
task subrepos: %w[m1 mbi pb mftf v2_0]
end

0 comments on commit 55d8815

Please sign in to comment.