-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpublishVELDocs.xml
executable file
·132 lines (118 loc) · 4.71 KB
/
publishVELDocs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<project default="make">
<target name="make">
<!--documentation-->
<echo message="stage=${stage}"/>
<echo message="version=${version}"/>
<echo message="datetimelocal=${datetimelocal}"/>
<antcall target="-make-docs"/>
<antcall target="-package"/>
</target>
<target name="-check-docs">
<uptodate targetfile="VEL-v1.0-csprd01-model.html"
property= "docs-VEL-html-okay">
<srcfiles dir=".">
<include name="VEL-v1.0-csprd01-model.xml"/>
</srcfiles>
</uptodate>
<uptodate targetfile="VEL-v1.0-csprd01-model.pdf"
property= "docs-VEL-pdf-okay">
<srcfiles dir=".">
<include name="VEL-v1.0-csprd01-model.xml"/>
</srcfiles>
</uptodate>
<condition property="docs-VEL-okay">
<and>
<istrue value="${docs-VEL-html-okay}"/>
<istrue value="${docs-VEL-pdf-okay}"/>
</and>
</condition>
</target>
<target name="-make-docs" depends="-check-docs" unless="docs-VEL-okay">
<!--remove old results-->
<delete file="VEL-v1.0-csprd01-model.html"/>
<delete file="VEL-v1.0-csprd01-model.pdf"/>
<delete file="VEL-v1.0-csprd01-model-pub.zip"/>
<!--package inputs-->
<zip destfile="VEL-v1.0-csprd01-model-pub.zip">
<fileset dir=".">
<include name="VEL-v1.0-csprd01-model.xml"/>
<include name="realta-docbook-parameters.xsl"/>
<include name="Figures/**"/>
</fileset>
</zip>
<!--create outputs-->
<echo message="Submitting print job..."/>
<ant antfile="RealtaServerAnt.xml">
<property name="entrypoint" value="OASIS-spec2pdfhtml"/>
<property name="fileupload"
value="VEL-v1.0-csprd01-model-pub.zip"/>
<property name="dateprefix" value="VEL 1.0"/>
</ant>
<echo message="Check and cleanup..."/>
<available property="ready-pdf" file="VEL-v1.0-csprd01-model.pdf"/>
<fail unless="ready-pdf" message="PDF not created"/>
<available property="ready-html" file="VEL-v1.0-csprd01-model.html"/>
<fail unless="ready-html" message="HTML not created"/>
<!--these touches are necessary because unzip doesn't preserve time of day-->
<touch file="VEL-v1.0-csprd01-model.pdf"/>
<touch file="VEL-v1.0-csprd01-model.html"/>
<!--intermediate file no longer needed-->
<delete file="VEL-v1.0-csprd01-model-pub.zip"/>
</target>
<target name="-package">
<echo message="Checking existence of results..."/>
<available property="html-made" file="VEL-v1.0-csprd01-model.html"/>
<available property="pdf-made" file="VEL-v1.0-csprd01-model.pdf"/>
<condition property="docs-not-made">
<not>
<and>
<istrue value="${html-made}"/>
<istrue value="${pdf-made}"/>
</and>
</not>
</condition>
<fail if="docs-not-made" message="Problem with creating the documentation"/>
<delete dir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}"/>
<mkdir dir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}"/>
<copy todir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}">
<fileset dir=".">
<include name="VEL-v1.0-csprd01-model.xml"/>
<include name="VEL-v1.0-csprd01-model.html"/>
<include name="VEL-v1.0-csprd01-model.pdf"/>
</fileset>
</copy>
<mkdir dir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}/db"/>
<copy todir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}/db">
<fileset dir="db/spec-0.8/htmlruntime">
<include name="**"/>
</fileset>
</copy>
<mkdir dir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}/Figures"/>
<copy todir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}/Figures">
<fileset dir="Figures"> <!-- TODO: own Figures for HTML -->
<include name="*"/>
</fileset>
</copy>
<!--
<mkdir dir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}/art/artpdf"/>
<copy todir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}/art/artpdf">
<fileset dir="art">
<include name="*"/>
</fileset>
</copy> -->
<delete file="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}.zip"/>
<touch datetime="${datetimelocal}" pattern="yyyyMMdd-HHmm">
<fileset dir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}"/>
</touch>
<zip destfile="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}.zip"
basedir="${dir}" includes="hub-VEL-v1.0-csprd01-model-${stage}-${version}/**"/>
<delete dir="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}"/>
<unzip src="${dir}hub-VEL-v1.0-csprd01-model-${stage}-${version}.zip"
dest="${dir}"/>
<touch datetime="${datetimelocal}" pattern="yyyyMMdd-HHmm">
<fileset dir="${dir}">
<include name="hub-VEL-v1.0-csprd01-model-${stage}-${version}.zip"/>
</fileset>
</touch>
</target>
</project>