annotate dox_task.pl @ 14:d997ff96acf1

sync
author sergey
date Mon, 19 May 2014 18:34:16 +0400
parents fa7a99c2d079
children 573a92d54f07
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 {
sergey
parents: 7
diff changeset
17 doxyfile => '_doc/doxyfile',
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 {
sergey
parents: 7
diff changeset
21 doxyfile => 'Doc/doxyfile',
sergey
parents: 7
diff changeset
22 src => 'https://hg.implab.org/private/Pallada.PoiskAvia'
sergey
parents: 7
diff changeset
23 }
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
24 );
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
25
14
sergey
parents: 7
diff changeset
26 my $base = Config->AppDir('mercurial-data');
sergey
parents: 7
diff changeset
27
sergey
parents: 7
diff changeset
28 foreach my $desc (@repos) {
sergey
parents: 7
diff changeset
29 my $name = pop (@{[split /\//, $desc->{src}]});
sergey
parents: 7
diff changeset
30 print "processing: $name\n";
sergey
parents: 7
diff changeset
31 my $dir = File::Spec->catdir($base,$name);
sergey
parents: 7
diff changeset
32 my $update;
sergey
parents: 7
diff changeset
33 if (-d $dir) {
sergey
parents: 7
diff changeset
34
sergey
parents: 7
diff changeset
35 my $repo = HG->new($dir,\%config::hgSettings);
sergey
parents: 7
diff changeset
36 my $income = $repo->Income();
sergey
parents: 7
diff changeset
37 if (@$income) {
sergey
parents: 7
diff changeset
38 print "donwloading changes\n";
sergey
parents: 7
diff changeset
39 $repo->Pull(['-u']);
sergey
parents: 7
diff changeset
40 $update = 1;
sergey
parents: 7
diff changeset
41 }
sergey
parents: 7
diff changeset
42 } else {
sergey
parents: 7
diff changeset
43 print "clonning $name to $dir\n";
sergey
parents: 7
diff changeset
44 my $repo = HG->Clone($desc->{src},$dir,[],\%config::hgSettings);
sergey
parents: 7
diff changeset
45 $update = 1;
sergey
parents: 7
diff changeset
46 }
sergey
parents: 7
diff changeset
47
sergey
parents: 7
diff changeset
48 if ($update) {
sergey
parents: 7
diff changeset
49 print "updating $name";
sergey
parents: 7
diff changeset
50 my $task = DoxygenTask->new(
sergey
parents: 7
diff changeset
51 doxyfile => File::Spec->catdir($dir,$desc->{doxyfile}),
sergey
parents: 7
diff changeset
52 makedoc => 1,
sergey
parents: 7
diff changeset
53 dataDirPath => Config->AppDir('doxygen-data', $name),
sergey
parents: 7
diff changeset
54 connection => $config::doxConnection
sergey
parents: 7
diff changeset
55 );
sergey
parents: 7
diff changeset
56
sergey
parents: 7
diff changeset
57 $task->DoWork();
sergey
parents: 7
diff changeset
58 } else {
sergey
parents: 7
diff changeset
59 print "$name is up to date\n";
sergey
parents: 7
diff changeset
60 }
sergey
parents: 7
diff changeset
61 }
sergey
parents: 7
diff changeset
62
sergey
parents: 7
diff changeset
63 #xmlDocPath => '/home/sergey/projects/Dusel/_doc/xml',
sergey
parents: 7
diff changeset
64 # collectionName => 'dusel',
sergey
parents: 7
diff changeset
65 # doxyfile => '/home/sergey/projects/Dusel/_doc/doxyfile',
sergey
parents: 7
diff changeset
66 # dataDirPath => File::Spec->catdir($base,'doxygen-data','dusel'),
sergey
parents: 7
diff changeset
67 # connection => $doxConnection,
sergey
parents: 7
diff changeset
68 # language => 'csharp'
sergey
parents: 7
diff changeset
69
sergey
parents: 7
diff changeset
70 #my $task = DoxygenTask->new(
sergey
parents: 7
diff changeset
71 # %config::doxSource
sergey
parents: 7
diff changeset
72 #);
sergey
parents: 7
diff changeset
73
sergey
parents: 7
diff changeset
74 #$task->DoWork();
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
75
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
76 print "completed\n";