-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuildbot.build
123 lines (101 loc) · 5.42 KB
/
buildbot.build
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
<?xml version="1.0" ?>
<project basedir=".." default="build">
<!-- This nant script is used by the SharpSvn buildbot -->
<if test="${property::exists('build.include')}">
<include buildfile="${build.include}" />
</if>
<property name="programfilesX86" value="C:\Program Files (x86)" overwrite="false" />
<property name="nantExe" value="${assembly::get-location(nant::get-assembly())}" overwrite="false" />
<property name="sevenZipExe" value="7z.exe" overwrite="false" />
<property name="signtoolExe" value="" overwrite="false" />
<target name="prepare">
<delete dir="release" if="${directory::exists('release')}" />
<mkdir dir="release" />
<exec program="svn.exe" output=".svn-info"><arg line="info src --xml" /></exec>
<xmlpeek file=".svn-info" xpath="/info/entry/@revision" property="checkout-rev" />
<property name="versionBase" value="" />
<property name="versionBase" value="${string::replace(string::replace(build.branch, 'v', ''), '.x', '')}"
if="${property::exists('build.branch')}" />
<echo append="false" file="msbuildprops.txt">/P:AnnotatePdbFile=true
/P:ForceAssemblyCopyright="Copyright (c) 2003-${datetime::get-year(datetime::now())} The AnkhSVN Project. This code and its source is licensed under the Apache 2.0 license. Check http://ankhsvn.net/ for details."
/P:ForceAssemblyCompany="AnkhSVN Project - http://ankhsvn.net/"
/P:ForceAssemblyProduct="AnkhSVN - Apache Subversion support for Visual Studio"
/P:ForceAssemblyConfiguration="Release"
/P:RegisterOutputPackage=false
/P:DeployExtension=false
/P:DistBuild=true
/P:Configuration=ReleaseMSI
/P:Platform=x86
/P:WpfRegPkg="${VS2010SDKDIR}\VisualStudioIntegration\Tools\Bin\RegPkg.exe"
</echo>
<if test="${property::exists('CCNetNumericLabel')}">
<echo append="true" file="msbuildprops.txt">/P:ForceAssemblyVersion="${versionBase}.${checkout-rev}.${CCNetNumericLabel}"
/P:SolutionDefineConstants="ankhVersion=${versionBase}.${checkout-rev}.${CCNetNumericLabel}"
</echo>
<echo file="release\_${versionBase}.${checkout-rev}.${CCNetNumericLabel}_.txt">${versionBase}.${checkout-rev}.${CCNetNumericLabel}</echo>
<echo file="release\ver.txt" message="${versionBase}.${checkout-rev}.${CCNetNumericLabel}" />
</if>
</target>
<target name="build" depends="prepare">
</target>
<target name="package" if="${property::exists('CCNetNumericLabel')}">
<property name="artifactLabel" value="${CCNetNumericLabel}" />
<if test="${file::exists('release/ver.txt')}">
<loadfile file="release/ver.txt" property="ankhVersion" />
<copy file="src/Ankh.Votive/bin/Release/AnkhSvn.msi"
tofile="release/AnkhSvn-${ankhVersion}.msi" />
<exec program="tools/signtool.exe" if="${signtoolExe != ''}">
<arg line='sign /v /n "Collabnet"' />
<arg line='/du http://ankhsvn.open.collab.net/' />
<arg line='/d' />
<arg value="AnkhSVN ${ankhVersion}" />
<arg line="/fd SHA256" />
<arg line='/t http://timestamp.digicert.com' />
<arg value="release/AnkhSvn-${ankhVersion}.msi" />
</exec>
<zip zipfile="release/AnkhSvn-${ankhVersion}-Symbols.zip" flatten="true" duplicate="preserve">
<fileset basedir="src">
<include name="Ankh*/bin/release/*.pdb" />
</fileset>
</zip>
<property name="artifactLabel" value="${ankhVersion}" />
<if test="${property::exists('collabUploadCredentials') and property::exists('collabUploadExe')}">
<exec program="${collabUploadExe}">
<arg line="${collabUploadCredentials}" />
<arg line="--site https://ankhsvn.open.collab.net" />
<arg line="--max-uploads 30" />
<arg line="--keep 28.0:00" />
<!--arg line="- -result resulting.uri" /-->
<arg line="--folder 707" />
<arg value="--description" />
<arg value="Build ${artifactLabel} MSI" />
<arg value="release/AnkhSvn-${ankhVersion}.msi" />
</exec>
<exec program="${collabUploadExe}">
<arg line="${collabUploadCredentials}" />
<arg line="--site https://ankhsvn.open.collab.net" />
<arg line="--max-uploads 30" />
<arg line="--keep 28.0:00" />
<!--arg line="- -result resulting.uri" /-->
<arg line="--folder 708" />
<arg value="--description" />
<arg value="Build ${artifactLabel} Symbols" />
<arg value="release/AnkhSvn-${ankhVersion}-Symbols.zip" />
</exec>
</if>
</if>
<if test="${property::exists('artifactBase')}">
<exec program="${sevenZipExe}">
<arg line="a -y" />
<arg value="release\${CCNetProject}-${artifactLabel}.7z" />
<arg value="release" />
</exec>
<mkdir dir="D:\artifacts\${CCNetProject}" />
<delete file="${artifactBase}\${CCNetProject}\${CCNetProject}-${artifactLabel}.7z" />
<move todir="${artifactBase}\${CCNetProject}" file="release\${CCNetProject}-${artifactLabel}.7z" />
<echo file="${artifactBase}\${CCNetProject}\_last.txt" message="${CCNetProject}-${artifactLabel}.7z" />
</if>
</target>
<target name="buildbot-build" depends="build"></target>
<target name="buildbot-package" depends="build,package"></target>
</project>