-
Notifications
You must be signed in to change notification settings - Fork 0
/
nightly.xml
199 lines (192 loc) · 10.3 KB
/
nightly.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?xml version="1.0" ?>
<project name="nant" default="nightly">
<!-- import necessary sourceforge.net ssh configurations -->
<include buildfile="etc/shellconfig.xml" />
<!-- set release type -->
<property name="project.release.type" value="nightly" />
<!-- include master build file -->
<include buildfile="nant.build" />
<!-- determine path for nightly build dist packages on sf.net relative to web path -->
<property name="nightly.builds.path" value="nightly/${build.date}-${project.version}" />
<!-- Perform a 'nightly' build, and install NAnt to install.dir -->
<target name="nightly" depends="set-net-1.0-framework-configuration,package,deploy-sf,install" description="Perform a 'nightly' package, and installs NAnt." />
<!-- deploy content to sourceforge -->
<target name="deploy-sf" depends="deploy-distributions-sf,deploy-schema-sf,deploy-doc-sf,deploy-web-sf">
<!-- remove existing symlink, if it exists -->
<exec program="ssh" failonerror="false">
<arg line="${sf.connection}" />
<arg value="rm --force ${sf.net.web.path}/nightly/latest" />
</exec>
<!-- finally, create symlink to the just uploaded nightly build -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="ln -s ${sf.net.web.path}/${nightly.builds.path} ${sf.net.web.path}/nightly/latest" />
</exec>
</target>
<!-- copy the nighly build distributions to sourceforge -->
<target name="deploy-distributions-sf" depends="set-net-1.0-framework-configuration,package,create-shell">
<!-- make sure the directory tree exists -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value=" mkdir --mode=775 --parents ${sf.net.web.path}/${nightly.builds.path}" />
</exec>
<!-- copy the source zip distribution to sourceforge -->
<exec program="scp" workingdir="${path::get-directory-name(project.zip-path.src)}">
<arg value="${path::get-file-name(project.zip-path.src)}" />
<arg value="${serverpart}/${nightly.builds.path}/${project.name}-src.zip" />
</exec>
<!-- copy the source gzipped tar distribution to sourceforge -->
<exec program="scp" workingdir="${path::get-directory-name(project.zip-path.src)}">
<arg value="${path::get-file-name(project.gzip-path.src)}" />
<arg value="${serverpart}/${nightly.builds.path}/${project.name}-src.tar.gz" />
</exec>
<!-- copy the binary zip distribution to sourceforge -->
<exec program="scp" workingdir="${path::get-directory-name(project.zip-path.bin)}">
<arg value="${path::get-file-name(project.zip-path.bin)}" />
<arg value="${serverpart}/${nightly.builds.path}/${project.name}-bin.zip" />
</exec>
<!-- copy the binary gzipped tar distribution to sourceforge -->
<exec program="scp" workingdir="${path::get-directory-name(project.zip-path.bin)}">
<arg value="${path::get-file-name(project.gzip-path.bin)}" />
<arg value="${serverpart}/${nightly.builds.path}/${project.name}-bin.tar.gz" />
</exec>
<!-- copy the release notes and license to sourceforge -->
<exec program="scp" workingdir="${build.dir}/doc">
<arg value="-C" />
<arg value="*.html" />
<arg value="${serverpart}/${nightly.builds.path}/" />
</exec>
<echo message="Copied distributions over to SF.Net" />
<!-- make sure permissions are set right -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="chmod -R 775 ${sf.net.web.path}/${nightly.builds.path}" />
</exec>
<!-- make sure group is set right -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="chgrp -R nant ${sf.net.web.path}/${nightly.builds.path}" />
</exec>
<!--
This section installs the nightly files into the Sourceforge File Manager.
This will eventually replace the existing process of putting nightly files
in the website. Tested successfully. However, Sourceforge automatically
promotes the nightly files over the actual releases. Needs more planning
before implementation.
-->
<!-- Now put the nightly files in the Sourceforge File Manager -->
<echo message="Uploading to Sourceforge File Manager" />
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="mkdir --mode=775 -p ${sf.net.nightly.path}/${build.date}" />
</exec>
<exec program="scp" workingdir="${path::get-directory-name(project.zip-path.src)}">
<arg value="${path::get-file-name(project.zip-path.src)}" />
<arg value="${sf.connection}:${sf.net.nightly.path}/${build.date}/${project.name}-src.zip" />
</exec>
<exec program="scp" workingdir="${path::get-directory-name(project.zip-path.src)}">
<arg value="${path::get-file-name(project.gzip-path.src)}" />
<arg value="${sf.connection}:${sf.net.nightly.path}/${build.date}/${project.name}-src.tar.gz" />
</exec>
<exec program="scp" workingdir="${path::get-directory-name(project.zip-path.bin)}">
<arg value="${path::get-file-name(project.zip-path.bin)}" />
<arg value="${sf.connection}:${sf.net.nightly.path}/${build.date}/${project.name}-bin.zip" />
</exec>
<exec program="scp" workingdir="${path::get-directory-name(project.zip-path.bin)}">
<arg value="${path::get-file-name(project.gzip-path.bin)}" />
<arg value="${sf.connection}:${sf.net.nightly.path}/${build.date}/${project.name}-bin.tar.gz" />
</exec>
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="chmod -R 775 ${sf.net.nightly.path}/${build.date}" />
</exec>
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="chgrp -R nant ${sf.net.nightly.path}/${build.date}" />
</exec>
</target>
<!-- copy schema to sourceforge -->
<target name="deploy-schema-sf" depends="set-net-1.0-framework-configuration,package,create-shell">
<!-- make sure the directory tree exists -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="mkdir --mode=775 --parents ${sf.net.web.path}/${nightly.builds.path}" />
</exec>
<!-- copy the schema file to sourceforge (using compression) -->
<exec workingdir="${build.dir}/schema" program="scp">
<arg value="-C" />
<arg value="${project.name}.xsd" />
<arg value="${serverpart}/${nightly.builds.path}/${project.name}.xsd" />
</exec>
<echo message="Copied schema over to SF.Net" />
<!-- make sure permissions are set right -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="chmod 775 ${sf.net.web.path}/${nightly.builds.path}/${project.name}.xsd" />
</exec>
<!-- make sure group is set right -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="chgrp nant ${sf.net.web.path}/${nightly.builds.path}/${project.name}.xsd" />
</exec>
</target>
<!-- copy online docs (manual) to sourceforge -->
<target name="deploy-doc-sf" depends="set-net-1.0-framework-configuration,package-doc,create-shell">
<!-- make sure the directory tree exists -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="mkdir --mode=775 --parents ${sf.net.web.path}/${nightly.builds.path}" />
</exec>
<!-- copy the gzipped tar doc distribution to sourceforge -->
<exec workingdir="${path::get-directory-name(project.gzip-path.doc)}" program="scp">
<arg value="${path::get-file-name(project.gzip-path.doc)}" />
<arg value="${serverpart}/${nightly.builds.path}/doc.tar.gz" />
</exec>
<!-- extract the doc distribution on sourceforge -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="cd ${sf.net.web.path}/${nightly.builds.path} && tar -xzf doc.tar.gz && rm --force doc.tar.gz" />
</exec>
<echo message="Copied online docs over to SF.Net" />
<!-- make sure permissions are set right -->
<exec program="ssh" failonerror="false">
<arg line="${sf.connection}" />
<arg value="chmod -R 775 ${sf.net.web.path}/${nightly.builds.path}/help" />
</exec>
<!-- make sure group is set right -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="chgrp -R nant ${sf.net.web.path}/${nightly.builds.path}/help" />
</exec>
</target>
<!-- copy website to sourceforge -->
<target name="deploy-web-sf" depends="set-net-1.0-framework-configuration,package,create-shell">
<!-- make sure the directory tree exists -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="mkdir --mode=775 --parents ${sf.net.web.path}" />
</exec>
<!-- try to remove existing files -->
<exec program="ssh" failonerror="false">
<arg line="${sf.connection}" />
<arg value="find ${sf.net.web.path} -maxdepth 1 -type f -exec rm --force {} \;" />
</exec>
<!-- copy images and html files for website to sourceforge (using compression) -->
<exec workingdir="${build.dir}/web" program="scp">
<arg value="-C" />
<arg value="*" />
<arg value="${serverpart}" />
</exec>
<echo message="Copied website over to SF.Net" />
<!-- make sure permissions are set right -->
<exec program="ssh" failonerror="false">
<arg line="${sf.connection}" />
<arg value="find ${sf.net.web.path} -maxdepth 1 -type f -exec chmod 775 {} \;" />
</exec>
<!-- make sure group is set right -->
<exec program="ssh">
<arg line="${sf.connection}" />
<arg value="find ${sf.net.web.path} -maxdepth 1 -type f -exec chgrp nant {} \;" />
</exec>
</target>
</project>