Use git system commands instead of ruby gems
This commit is contained in:
parent
d37721a3b3
commit
af82165502
|
@ -2,7 +2,6 @@
|
|||
require 'optparse'
|
||||
require 'fileutils'
|
||||
require 'yaml'
|
||||
require 'rugged'
|
||||
|
||||
options = {}
|
||||
OptionParser.new { |opts|
|
||||
|
@ -29,10 +28,14 @@ OptionParser.new { |opts|
|
|||
}.parse!
|
||||
|
||||
def clone_and_update_project(target, clone_target, git, ref)
|
||||
@git_options = "-b #{ref}" if ref =~ /tags/
|
||||
if !File.directory?(clone_target)
|
||||
puts "Cloning to #{target}: #{ref} to #{clone_target} ..."
|
||||
puts "Cloning #{git} to #{clone_target} ..."
|
||||
FileUtils.mkdir_p(clone_target)
|
||||
Rugged::Repository.clone_at(git, clone_target, {:checkout_branch => ref})
|
||||
%x(git clone #{git} #{clone_target})
|
||||
|
||||
puts "Checking out #{ref}"
|
||||
%x(git --git-dir=#{clone_target}/.git --work-tree=#{clone_target} checkout #{ref} #{@git_options})
|
||||
else
|
||||
puts "Cleaning up #{clone_target}"
|
||||
FileUtils::rm_rf(clone_target)
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
site_name: 'Business Process Module'
|
||||
source_dir: 'www/source'
|
||||
site_dir: 'www/html'
|
||||
project:
|
||||
git: 'https://github.com/Icinga/icingaweb2-module-businessprocess.git'
|
||||
ref: 'tags/v2.1.0'
|
||||
target: 'businessprocess'
|
||||
docs_dir: 'doc'
|
||||
latest: true
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
site_name: 'Director'
|
||||
source_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/source'
|
||||
site_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/html'
|
||||
source_dir: 'www/source'
|
||||
site_dir: 'www/html'
|
||||
project:
|
||||
git: 'https://github.com/Icinga/icingaweb2-module-director.git'
|
||||
ref: 'support/1.4'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
site_name: 'Icinga 2'
|
||||
source_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/source'
|
||||
site_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/html'
|
||||
source_dir: 'www/source'
|
||||
site_dir: 'www/html'
|
||||
project:
|
||||
git: 'https://github.com/Icinga/icinga2.git'
|
||||
ref: 'support/2.7'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
site_name: 'Icinga Web 2'
|
||||
source_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/source'
|
||||
site_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/html'
|
||||
source_dir: 'www/source'
|
||||
site_dir: 'www/html'
|
||||
project:
|
||||
git: 'https://github.com/Icinga/icingaweb2.git'
|
||||
ref: 'support/v2.4'
|
||||
|
|
Loading…
Reference in New Issue