Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-10-09 02:57:08 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-10-09 02:57:08 +0300
commit51acc5c4d904f327f267ba8648e151a11566ba70 (patch)
treedf6104e09834874b63cda2dcb92a988e90398567 /Rakefile
parent6e9811b343a93274138d9a6893932258a3acab43 (diff)
Working Rake task, update home page.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile55
1 files changed, 34 insertions, 21 deletions
diff --git a/Rakefile b/Rakefile
index 03d5a243..2d04684f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -7,34 +7,47 @@ desc 'Pulls down the CE, EE, and Omnibus git repos and merges the content of the
task :pull_repos do
force = ENV['RAKE_FORCE_DELETE']
- ce_repo = 'https://gitlab.com/gitlab-org/gitlab-ce.git'
- ce_dir = 'tmp/ce/'
- dest_ce_dir = 'content/ce/'
-
- ee_repo = 'https://gitlab.com/gitlab-org/gitlab-ee.git'
- ee_dir = 'tmp/ee/'
- dest_ee_dir = 'content/ee/'
+ ce = {
+ repo: 'https://gitlab.com/gitlab-org/gitlab-ce.git',
+ temp_dir: 'tmp/ce/',
+ dest_dir: 'content/ce/'
+ }
+
+ ee = {
+ repo: 'https://gitlab.com/gitlab-org/gitlab-ee.git',
+ temp_dir: 'tmp/ee/',
+ dest_dir: 'content/ee/'
+ }
+
+ omnibus = {
+ repo: 'https://gitlab.com/gitlab-org/omnibus-gitlab.git',
+ temp_dir: 'tmp/omnibus/',
+ dest_dir: 'content/omnibus/'
+ }
+
+ products = [ce, ee, omnibus]
+
+ dirs = []
+ products.each do |product|
+ dirs.push(product[:temp_dir])
+ dirs.push(product[:dest_dir])
+ end
unless force
- puts "Are you sure you want to remove #{ce_dir}, #{dest_ce_dir}, #{ee_dir}, and #{dest_ee_dir}? [y/n]"
+ puts "WARNING: Are you sure you want to remove #{dirs.join(', ')}? [y/n]"
exit unless STDIN.gets.index(/y/i) == 0
end
- [ce_dir, dest_ce_dir, ee_dir, dest_ee_dir].each do |dir|
+ dirs.each do |dir|
puts "\n=> Deleting #{dir} if it exists\n"
`rm -rf #{dir}`
end
- puts "\n=> Cloning #{ce_repo} into #{ce_dir}\n"
- `git clone #{ce_repo} #{ce_dir} --depth 1`
-
- puts "\n=> Moving #{ce_dir}doc/ into #{dest_ce_dir}\n"
- cp Dir["standard_data/*.data"], "testdata"
- `mv #{ce_dir}doc/ #{dest_ce_dir}`
-
- puts "\n=> Cloning #{ee_repo} into #{ee_dir}\n"
- `git clone #{ee_repo} #{ee_dir} --depth 1`
-
- puts "\n=> Moving #{ee_dir}doc/ into #{dest_ee_dir}\n"
- `mv #{ee_dir}doc/ #{dest_ee_dir}`
+ products.each do |product|
+ puts "\n=> Cloning #{product[:repo]} into #{product[:temp_dir]}\n"
+ `git clone #{product[:repo]} #{product[:temp_dir]} --depth 1`
+
+ puts "\n=> Moving #{product[:temp_dir]}doc/ into #{product[:dest_dir]}\n"
+ `mv #{product[:temp_dir]}doc/ #{product[:dest_dir]}`
+ end
end