-
Notifications
You must be signed in to change notification settings - Fork 0
/
SuperSocket.build
137 lines (114 loc) · 4.7 KB
/
SuperSocket.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
124
125
126
127
128
129
130
131
132
133
134
135
136
<?xml version="1.0" ?>
<project name="SuperSocket" default="makeRelease" xmlns="http://nant.sf.net/schemas/nant.xsd">
<property name="build.dir" value="${project::get-base-directory()}" />
<property name="releaseVersion" overwrite="false" value=""></property>
<target name="zipSourceCode" description="zip the source code">
<zip zipfile="SuperSocket${releaseVersionTag}.Source.zip">
<fileset basedir=".">
<include name="**/*" />
<exclude name="**/bin/**" />
<exclude name="**/obj/**" />
<exclude name="**/.git/**" />
<exclude name="**/*.user" />
<exclude name="**/*.suo" />
<exclude name="**/.gitignore" />
<exclude name="*Push.bat" />
<exclude name="*SuperSocket.build" />
</fileset>
</zip>
</target>
<target name="cleanObjDir" description="clear the obj dir">
<delete>
<fileset>
<include name="**/obj/**"/>
</fileset>
</delete>
</target>
<target name="zipBinaries" description="zip the binary output">
<zip zipfile="SuperSocket${releaseVersionTag}.Binaries.zip">
<fileset basedir="bin">
<include name="**/*" />
</fileset>
</zip>
</target>
<target name="buildSln" description="build the solution">
<msbuild project="${solutionFile}" verbose="true">
<arg value="/t:Clean;Build" />
<arg value="/p:OutputPath=${build.dir}\bin\${netFxVersion}\${configuration}" />
</msbuild>
</target>
<target name="buildPrj" description="build the project">
<msbuild project="${solutionFile}" verbose="true">
<arg value="/t:Clean;Build" />
<arg value="/p:OutputPath=${build.dir}\bin\${netFxVersion}\${configuration}" />
</msbuild>
</target>
<target name="nugetPack" description="pack the nuget package">
<copy file="SuperSocket.nuspec" tofile="nuget\SuperSocket.nuspec" />
<property name="netFxVersion" value="net40" />
<call target="nugetPackVersion" />
<property name="netFxVersion" value="net45" />
<call target="nugetPackVersion" />
<copy file="Solution Items\log4net.config" tofile="nuget\content\log4net.config" />
<copy file="Solution Items\log4net.unix.config" tofile="nuget\content\log4net.unix.config" />
<copy file="SocketService\supersocket.cmd" tofile="nuget\content\supersocket.cmd" />
<copy file="SocketService\supersocket.sh" tofile="nuget\content\supersocket.sh" />
<loadfile file="nuget.key" property="nuget.key" />
<exec program="nuget" failonerror="true">
<arg line="SetApiKey ${nuget.key}" />
</exec>
<exec program="nuget" failonerror="true">
<arg line="Pack nuget\SuperSocket.nuspec" />
</exec>
<exec program="nuget" failonerror="true">
<arg line="Push SuperSocket.${releaseVersion}.nupkg" />
</exec>
</target>
<target name="nugetPackVersion" description="pack the nuget package">
<mkdir dir="nuget\lib\${netFxVersion}" />
<copy todir="nuget\lib\${netFxVersion}">
<fileset basedir="bin\${netFxVersion}\Release">
<include name="*.dll" />
<include name="*.xml" />
<include name="*.exe" />
</fileset>
</copy>
</target>
<target name="makeRelease" description="make the release package">
<property name="releaseVersionTag" value=""/>
<if test="${string::get-length(releaseVersion) > 0}">
<property name="releaseVersionTag" value="(${releaseVersion})"/>
</if>
<call target="zipSourceCode" />
<property name="netFxVersion" value="net40" />
<property name="configuration" value="Debug" />
<property name="solutionFile" value="SuperSocket.2010.sln" />
<call target="buildSln" />
<property name="solutionFile" value="Management\Server\SuperSocket.ServerManager.Net40.csproj" />
<call target="buildPrj" />
<call target="cleanObjDir" />
<property name="netFxVersion" value="net40" />
<property name="configuration" value="Release" />
<property name="solutionFile" value="SuperSocket.2010.sln" />
<call target="buildSln" />
<property name="solutionFile" value="Management\Server\SuperSocket.ServerManager.Net40.csproj" />
<call target="buildPrj" />
<call target="cleanObjDir" />
<property name="netFxVersion" value="net45" />
<property name="configuration" value="Debug" />
<property name="solutionFile" value="SuperSocket.2012.sln" />
<call target="buildSln" />
<property name="solutionFile" value="Management\Server\SuperSocket.ServerManager.Net45.csproj" />
<call target="buildPrj" />
<call target="cleanObjDir" />
<property name="netFxVersion" value="net45" />
<property name="configuration" value="Release" />
<property name="solutionFile" value="SuperSocket.2012.sln" />
<call target="buildSln" />
<property name="solutionFile" value="Management\Server\SuperSocket.ServerManager.Net45.csproj" />
<call target="buildPrj" />
<call target="cleanObjDir" />
<call target="zipBinaries" />
<call target="nugetPack" />
</target>
</project>