view dox_task.pl @ 16:e69c970c3ddd default tip

sync
author sergey
date Tue, 20 May 2014 01:28:48 +0400
parents 573a92d54f07
children
line wrap: on
line source

#!/usr/bin/perl -w
use lib '.';
use config;
use config::bootstrap;
use strict;
use URI;


use IMPL::require {
	DoxygenTask => 'Benzin::Doxygen::MakedocTask',
	HG => 'Benzin::SCC::Mercurial',
	Config => 'IMPL::Config'
};

my @repos = (
	{
		doxyfile => 'doxyfile',
		src => 'https://hg.implab.org/pub/ImplabNet'
	},
	{
		doxyfile => 'Solution/doxyfile',
		src => 'https://hg.implab.org/private/Pallada.PoiskAvia'
	},
	{
		doxyfile => 'doxyfile',
		src => 'https://hg.implab.org/private/Pallada.Kospas'
	}
);

my $base = Config->AppDir('mercurial-data');

foreach my $desc (@repos) {
	my $name = pop (@{[split /\//, $desc->{src}]});
	print "processing: $name\n";  
	my $dir = File::Spec->catdir($base,$name);
	my $update = 0;
	if (-d $dir) {
		
		my $repo = HG->new($dir,\%config::hgSettings);
		my $income = $repo->Income();
		if (@$income) {
			print "donwloading changes\n";
			$repo->Pull(['-u']);
			$update = 1;
		}
	} else {
		print "clonning $name to $dir\n";
		my $repo = HG->Clone($desc->{src},$dir,[],\%config::hgSettings);
		$update = 1;
	}
	
	if ($update) {
		print "updating $name\n";
		my $task = DoxygenTask->new(
			doxyfile => File::Spec->catdir($dir,$desc->{doxyfile}),
			makedoc => 1,
			dataDirPath => Config->AppDir('doxygen-data', $name),
			connection => $config::doxConnection  
		);
		
		$task->DoWork();
	} else {
		print "$name is up to date\n";
	}
}

#xmlDocPath => '/home/sergey/projects/Dusel/_doc/xml',
#    collectionName => 'dusel',
#    doxyfile => '/home/sergey/projects/Dusel/_doc/doxyfile',
#    dataDirPath => File::Spec->catdir($base,'doxygen-data','dusel'),
#    connection => $doxConnection,
#    language => 'csharp'

#my $task = DoxygenTask->new(
#	%config::doxSource
#);

#$task->DoWork();

print "completed\n";