-
Notifications
You must be signed in to change notification settings - Fork 4
/
release.xml
227 lines (218 loc) · 11.2 KB
/
release.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<?xml version="1.0"?>
<project name="nant" default="build-release">
<!-- import necessary sourceforge.net ssh configurations -->
<include buildfile="SFNetInclude.xml" />
<!-- include master build file -->
<include buildfile="nant.build" />
<!-- perform a 'release' package and upload to sf.net -->
<target name="build-release" depends="deploy-sf, install" description="Perform a 'release' package, uploads to sf.net and installs it" />
<!-- deploy content to sourceforge -->
<target name="deploy-sf" depends="deploy-releasenotes-sf, deploy-schema-sf, deploy-doc-sf">
<!-- remove existing symlink, if it exists -->
<exec program="ssh" failonerror="false">
<arg value="${sf.net.ssh.server}" />
<arg value="rm --force ${sf.net.web.path}/release/latest" />
</exec>
<!-- finally, create symlink to the just uploaded release build -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="ln -s ${sf.net.web.path}/release/${project.version.full} ${sf.net.web.path}/release/latest" />
</exec>
<!-- make sure permissions are set right -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="chmod -R 775 ${sf.net.web.path}/release/latest" />
</exec>
<!-- make sure group is set right -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="chgrp -R nant ${sf.net.web.path}/release/latest" />
</exec>
<!-- Now put the files in the Sourceforge File Manager -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="mkdir --mode=775 -p ${sf.net.release.path}/${project.version.full}" />
</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.release.path}/${project.version.full}" />
</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.release.path}/${project.version.full}" />
</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.release.path}/${project.version.full}" />
</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.release.path}/${project.version.full}" />
</exec>
<!-- make sure permissions are set right -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="chmod -R 775 ${sf.net.release.path}/${project.version.full}" />
</exec>
<!-- make sure group is set right -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="chgrp -R nant ${sf.net.release.path}/${project.version.full}" />
</exec>
</target>
<!-- copy the release notes and license to sourceforge -->
<target name="deploy-releasenotes-sf" depends="set-net-1.0-framework-configuration, release, package, create-shell">
<!-- make sure the directory tree exists -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="mkdir --mode=775 --parents ${sf.net.web.path}/release/${project.version.full}" />
</exec>
<!-- copy the release notes and license to sourceforge -->
<exec workingdir="${build.dir}/doc" program="scp">
<arg value="-C" />
<arg value="*.html" />
<arg value="${serverpart}/release/${project.version.full}/" />
</exec>
<echo message="Copied release notes and license over to SF.Net" />
<!-- make sure permissions are set right -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="chmod -R 775 ${sf.net.web.path}/release/${project.version.full}" />
</exec>
<!-- make sure group is set right -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="chgrp -R nant ${sf.net.web.path}/release/${project.version.full}" />
</exec>
</target>
<!-- copy schema to sourceforge -->
<target name="deploy-schema-sf" depends="set-net-1.0-framework-configuration, release, package, create-shell">
<!-- make sure the directory tree exists -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="mkdir --mode=775 --parents ${sf.net.web.path}/release/${project.version.full}" />
</exec>
<!-- copy schema file to sourceforge (using compression) -->
<exec workingdir="${build.dir}/schema" program="scp">
<arg value="-C" />
<arg value="${project.name}.xsd" />
<arg value="${serverpart}/release/${project.version.full}/${project.name}.xsd" />
</exec>
<echo message="Copied schema over to SF.Net" />
<!-- make sure permissions are set right -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="chmod 775 ${sf.net.web.path}/release/${project.version.full}/${project.name}.xsd" />
</exec>
<!-- make sure group is set right -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="chgrp nant ${sf.net.web.path}/release/${project.version.full}/${project.name}.xsd" />
</exec>
</target>
<!-- copy online docs (manual) to sourceforge -->
<target name="deploy-doc-sf" depends="set-net-1.0-framework-configuration, release, package-doc, create-shell">
<!-- make sure the directory tree exists -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="mkdir --mode=775 --parents ${sf.net.web.path}/release/${project.version.full}" />
</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}/release/${project.version.full}/doc.tar.gz" />
</exec>
<!-- extract the doc distribution on sourceforge -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="cd ${sf.net.web.path}/release/${project.version.full} && 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 value="${sf.net.ssh.server}" />
<arg value="chmod -R 775 ${sf.net.web.path}/release/${project.version.full}/help" />
</exec>
<!-- make sure group is set right -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="chgrp -R nant ${sf.net.web.path}/release/${project.version.full}/help" />
</exec>
</target>
<!-- copy website to sourceforge -->
<target name="deploy-web-sf" depends="set-net-1.0-framework-configuration, release, create-shell">
<!-- make sure the directory tree exists -->
<exec program="ssh">
<arg value="${sf.net.ssh.server}" />
<arg value="mkdir --mode=775 --parents ${sf.net.web.path}" />
</exec>
<!-- try to remove existing files -->
<exec program="ssh" failonerror="false">
<arg value="${sf.net.ssh.server}" />
<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 value="${sf.net.ssh.server}" />
<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 value="${sf.net.ssh.server}" />
<arg value="find ${sf.net.web.path} -maxdepth 1 -type f -exec chgrp nant {} \;" />
</exec>
</target>
<!-- Temporary directories for building the rpm...there might be a better way to do this. -->
<property name="rpm.base" value="c:/temp/NAnt/rpm"/>
<property name="rpm.working" value="c:/temp/NAnt/working"/>
<property name="cygwin.rpm.base" value="/cygdrive/c/temp/NAnt/rpm"/>
<property name="cygwin.rpm.working" value="/cygdrive/c/temp/NAnt/working"/>
<target name="setup-rpm" description="Sets up the environment for building rpms.">
<mkdir dir="${rpm.base}"/>
<mkdir dir="${rpm.base}/BUILD"/>
<mkdir dir="${rpm.base}/RPMS"/>
<mkdir dir="${rpm.base}/i386"/>
<mkdir dir="${rpm.base}/i686"/>
<mkdir dir="${rpm.base}/noarch"/>
<mkdir dir="${rpm.base}/SOURCES"/>
<mkdir dir="${rpm.base}/SPECS"/>
<mkdir dir="${rpm.base}/SRPMS"/>
<mkdir dir="${rpm.base}/tmp"/>
<mkdir dir="${rpm.base}/tmp/NAnt-src"/>
<mkdir dir="${rpm.base}/tmp/NAnt-tar"/>
</target>
<target name="prepare-rpm" depends="setup-rpm" description="Prepare the binaries for packaging.">
<copy todir="${rpm.base}/tmp/NAnt-src">
<fileset basedir="${build.dir}">
<include name="bin/**"/>
<!--include name="doc/**"/-->
<!--include name="examples/**"/-->
</fileset>
</copy>
<exec program="bash">
<arg line="-c -o onecmd"/>
<arg value="'tar -cvzf ${cygwin.rpm.base}/tmp/NAnt-tar/NAnt.tar.gz ${cygwin.rpm.base}/tmp/NAnt-src bin'"/>
</exec>
<copy file="${rpm.base}/tmp/NAnt-tar/NAnt.tar.gz" tofile="${rpm.base}/SOURCES/NAnt.tar.gz" overwrite="true"/>
<copy file="${build.dir}/NAnt.spec" tofile="${rpm.base}/SPECS/NAnt.spec" overwrite="true"/>
</target>
<target name="binary-rpm" description="Build the binary rpm for NAnt.">
<property name="commandline" value="rpmbuild -ba --buildroot=${cygwin.rpm.base}/tmp ${cygwin.rpm.base}/SPECS/NAnt.spec"/>
<echo file="${rpm.base}/build.bat">bash -c '${commandline}'</echo>
<exec program="bash">
<arg line="-c -o onecmd '${commandline}'"/>
</exec>
<copy todir="${build.dir}" flatten="true">
<fileset basedir="${rpm.base}/RPMS">
<include name="**/*.rpm"/>
</fileset>
</copy>
</target>
</project>