mirror of
https://github.com/Icinga/icinga-docs-tools.git
synced 2025-07-26 07:14:26 +02:00
Use git system commands instead of ruby gems
This commit is contained in:
parent
d37721a3b3
commit
af82165502
@ -2,7 +2,6 @@
|
|||||||
require 'optparse'
|
require 'optparse'
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
require 'rugged'
|
|
||||||
|
|
||||||
options = {}
|
options = {}
|
||||||
OptionParser.new { |opts|
|
OptionParser.new { |opts|
|
||||||
@ -29,10 +28,14 @@ OptionParser.new { |opts|
|
|||||||
}.parse!
|
}.parse!
|
||||||
|
|
||||||
def clone_and_update_project(target, clone_target, git, ref)
|
def clone_and_update_project(target, clone_target, git, ref)
|
||||||
|
@git_options = "-b #{ref}" if ref =~ /tags/
|
||||||
if !File.directory?(clone_target)
|
if !File.directory?(clone_target)
|
||||||
puts "Cloning to #{target}: #{ref} to #{clone_target} ..."
|
puts "Cloning #{git} to #{clone_target} ..."
|
||||||
FileUtils.mkdir_p(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
|
else
|
||||||
puts "Cleaning up #{clone_target}"
|
puts "Cleaning up #{clone_target}"
|
||||||
FileUtils::rm_rf(clone_target)
|
FileUtils::rm_rf(clone_target)
|
||||||
|
10
examples/businessprocess-latest.yml
Normal file
10
examples/businessprocess-latest.yml
Normal file
@ -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'
|
site_name: 'Director'
|
||||||
source_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/source'
|
source_dir: 'www/source'
|
||||||
site_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/html'
|
site_dir: 'www/html'
|
||||||
project:
|
project:
|
||||||
git: 'https://github.com/Icinga/icingaweb2-module-director.git'
|
git: 'https://github.com/Icinga/icingaweb2-module-director.git'
|
||||||
ref: 'support/1.4'
|
ref: 'support/1.4'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
site_name: 'Icinga 2'
|
site_name: 'Icinga 2'
|
||||||
source_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/source'
|
source_dir: 'www/source'
|
||||||
site_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/html'
|
site_dir: 'www/html'
|
||||||
project:
|
project:
|
||||||
git: 'https://github.com/Icinga/icinga2.git'
|
git: 'https://github.com/Icinga/icinga2.git'
|
||||||
ref: 'support/2.7'
|
ref: 'support/2.7'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
site_name: 'Icinga Web 2'
|
site_name: 'Icinga Web 2'
|
||||||
source_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/source'
|
source_dir: 'www/source'
|
||||||
site_dir: '/Users/bsheqa/git/github/icinga/icinga-docs-tools/www/html'
|
site_dir: 'www/html'
|
||||||
project:
|
project:
|
||||||
git: 'https://github.com/Icinga/icingaweb2.git'
|
git: 'https://github.com/Icinga/icingaweb2.git'
|
||||||
ref: 'support/v2.4'
|
ref: 'support/v2.4'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user