annotate dox_task.pl @ 15:573a92d54f07

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