comparison dox_task.pl @ 14:d997ff96acf1

sync
author sergey
date Mon, 19 May 2014 18:34:16 +0400
parents fa7a99c2d079
children 573a92d54f07
comparison
equal deleted inserted replaced
13:a9ce584a7f3b 14:d997ff96acf1
1 #!/usr/bin/perl -w 1 #!/usr/bin/perl -w
2 use lib '.'; 2 use lib '.';
3 use config; 3 use config;
4 use config::bootstrap; 4 use config::bootstrap;
5 use strict; 5 use strict;
6 use IMPL::Config; 6 use URI;
7
7 8
8 use IMPL::require { 9 use IMPL::require {
9 DoxygenTask => 'Benzin::Doxygen::MakedocTask', 10 DoxygenTask => 'Benzin::Doxygen::MakedocTask',
10 DoxModel => 'Benzin::Doxygen::Model', 11 HG => 'Benzin::SCC::Mercurial',
11 InlineFactory => 'IMPL::Object::InlineFactory' 12 Config => 'IMPL::Config'
12 }; 13 };
13 14
14 my $task = DoxygenTask->new( 15 my @repos = (
15 %config::doxSource 16 {
17 doxyfile => '_doc/doxyfile',
18 src => 'https://hg.implab.org/pub/ImplabNet'
19 },
20 {
21 doxyfile => 'Doc/doxyfile',
22 src => 'https://hg.implab.org/private/Pallada.PoiskAvia'
23 }
16 ); 24 );
17 25
18 $task->DoWork(); 26 my $base = Config->AppDir('mercurial-data');
27
28 foreach my $desc (@repos) {
29 my $name = pop (@{[split /\//, $desc->{src}]});
30 print "processing: $name\n";
31 my $dir = File::Spec->catdir($base,$name);
32 my $update;
33 if (-d $dir) {
34
35 my $repo = HG->new($dir,\%config::hgSettings);
36 my $income = $repo->Income();
37 if (@$income) {
38 print "donwloading changes\n";
39 $repo->Pull(['-u']);
40 $update = 1;
41 }
42 } else {
43 print "clonning $name to $dir\n";
44 my $repo = HG->Clone($desc->{src},$dir,[],\%config::hgSettings);
45 $update = 1;
46 }
47
48 if ($update) {
49 print "updating $name";
50 my $task = DoxygenTask->new(
51 doxyfile => File::Spec->catdir($dir,$desc->{doxyfile}),
52 makedoc => 1,
53 dataDirPath => Config->AppDir('doxygen-data', $name),
54 connection => $config::doxConnection
55 );
56
57 $task->DoWork();
58 } else {
59 print "$name is up to date\n";
60 }
61 }
62
63 #xmlDocPath => '/home/sergey/projects/Dusel/_doc/xml',
64 # collectionName => 'dusel',
65 # doxyfile => '/home/sergey/projects/Dusel/_doc/doxyfile',
66 # dataDirPath => File::Spec->catdir($base,'doxygen-data','dusel'),
67 # connection => $doxConnection,
68 # language => 'csharp'
69
70 #my $task = DoxygenTask->new(
71 # %config::doxSource
72 #);
73
74 #$task->DoWork();
19 75
20 print "completed\n"; 76 print "completed\n";