forked from nant/nant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.xml
173 lines (172 loc) · 9 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
<?xml version="1.0"?>
<project name="nant" default="build-release">
<!-- import necessary sourceforge.net ssh configurations -->
<include buildfile="etc/shellconfig.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-${framework::get-target-framework()}-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-${framework::get-target-framework()}-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-${framework::get-target-framework()}-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-${framework::get-target-framework()}-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>
</project>