|
38 | 38 | <target name="buildSln" description="build the solution">
|
39 | 39 | <msbuild project="${solutionFile}" verbose="true">
|
40 | 40 | <arg value="/t:Clean;Build" />
|
41 |
| - <arg value="/p:OutputPath=..\bin\${netFxVersion}\${configuration}" /> |
| 41 | + <arg value="/p:OutputPath=${build.dir}\bin\${netFxVersion}\${configuration}" /> |
42 | 42 | </msbuild>
|
43 | 43 | </target>
|
44 | 44 | <target name="buildPrj" description="build the project">
|
45 | 45 | <msbuild project="${solutionFile}" verbose="true">
|
46 | 46 | <arg value="/t:Clean;Build" />
|
47 |
| - <arg value="/p:OutputPath=..\..\bin\${netFxVersion}\${configuration}" /> |
| 47 | + <arg value="/p:OutputPath=${build.dir}\bin\${netFxVersion}\${configuration}" /> |
48 | 48 | </msbuild>
|
49 | 49 | </target>
|
50 | 50 |
|
| 51 | + <target name="nugetPack" description="pack the nuget package"> |
| 52 | + <copy file="SuperSocket.nuspec" tofile="nuget\SuperSocket.nuspec" /> |
| 53 | + |
| 54 | + <property name="netFxVersion" value="net40" /> |
| 55 | + <call target="nugetPackVersion" /> |
| 56 | + |
| 57 | + <property name="netFxVersion" value="net45" /> |
| 58 | + <call target="nugetPackVersion" /> |
| 59 | + |
| 60 | + <copy file="Solution Items\log4net.config" tofile="nuget\content\log4net.config" /> |
| 61 | + <copy file="Solution Items\log4net.unix.config" tofile="nuget\content\log4net.unix.config" /> |
| 62 | + <copy file="SocketService\supersocket.cmd" tofile="nuget\content\supersocket.cmd" /> |
| 63 | + <copy file="SocketService\supersocket.sh" tofile="nuget\content\supersocket.sh" /> |
| 64 | + |
| 65 | + <loadfile file="nuget.key" property="nuget.key" /> |
| 66 | + |
| 67 | + <exec program="nuget" failonerror="true"> |
| 68 | + <arg line="SetApiKey ${nuget.key}" /> |
| 69 | + </exec> |
| 70 | + |
| 71 | + <exec program="nuget" failonerror="true"> |
| 72 | + <arg line="Pack nuget\SuperSocket.nuspec" /> |
| 73 | + </exec> |
| 74 | + |
| 75 | + <exec program="nuget" failonerror="true"> |
| 76 | + <arg line="Push SuperSocket.${releaseVersion}.nupkg" /> |
| 77 | + </exec> |
| 78 | + </target> |
| 79 | + |
| 80 | + <target name="nugetPackVersion" description="pack the nuget package"> |
| 81 | + <mkdir dir="nuget\lib\${netFxVersion}" /> |
| 82 | + <copy todir="nuget\lib\${netFxVersion}"> |
| 83 | + <fileset basedir="bin\${netFxVersion}\Release"> |
| 84 | + <include name="*.dll" /> |
| 85 | + <include name="*.xml" /> |
| 86 | + <include name="*.exe" /> |
| 87 | + </fileset> |
| 88 | + </copy> |
| 89 | + </target> |
| 90 | + |
51 | 91 | <target name="makeRelease" description="make the release package">
|
52 | 92 | <property name="releaseVersionTag" value=""/>
|
53 | 93 | <if test="${string::get-length(releaseVersion) > 0}">
|
|
56 | 96 |
|
57 | 97 | <call target="zipSourceCode" />
|
58 | 98 |
|
59 |
| - <property name="netFxVersion" value="Net35" /> |
60 |
| - <property name="configuration" value="Debug" /> |
61 |
| - <property name="solutionFile" value="SuperSocket.2010.NET35.sln" /> |
62 |
| - <call target="buildSln" /> |
63 |
| - <property name="solutionFile" value="Management\Server\SuperSocket.ServerManager.Net35.csproj" /> |
64 |
| - <call target="buildPrj" /> |
65 |
| - <call target="cleanObjDir" /> |
66 |
| - |
67 |
| - <property name="netFxVersion" value="Net35" /> |
68 |
| - <property name="configuration" value="Release" /> |
69 |
| - <property name="solutionFile" value="SuperSocket.2010.NET35.sln" /> |
70 |
| - <call target="buildSln" /> |
71 |
| - <property name="solutionFile" value="Management\Server\SuperSocket.ServerManager.Net35.csproj" /> |
72 |
| - <call target="buildPrj" /> |
73 |
| - <call target="cleanObjDir" /> |
74 |
| - |
75 |
| - <property name="netFxVersion" value="Net40" /> |
| 99 | + <property name="netFxVersion" value="net40" /> |
76 | 100 | <property name="configuration" value="Debug" />
|
77 | 101 | <property name="solutionFile" value="SuperSocket.2010.sln" />
|
78 | 102 | <call target="buildSln" />
|
79 | 103 | <property name="solutionFile" value="Management\Server\SuperSocket.ServerManager.Net40.csproj" />
|
80 | 104 | <call target="buildPrj" />
|
81 | 105 | <call target="cleanObjDir" />
|
82 | 106 |
|
83 |
| - <property name="netFxVersion" value="Net40" /> |
| 107 | + <property name="netFxVersion" value="net40" /> |
84 | 108 | <property name="configuration" value="Release" />
|
85 | 109 | <property name="solutionFile" value="SuperSocket.2010.sln" />
|
86 | 110 | <call target="buildSln" />
|
87 | 111 | <property name="solutionFile" value="Management\Server\SuperSocket.ServerManager.Net40.csproj" />
|
88 | 112 | <call target="buildPrj" />
|
89 | 113 | <call target="cleanObjDir" />
|
90 | 114 |
|
91 |
| - <property name="netFxVersion" value="Net45" /> |
| 115 | + <property name="netFxVersion" value="net45" /> |
92 | 116 | <property name="configuration" value="Debug" />
|
93 | 117 | <property name="solutionFile" value="SuperSocket.2012.sln" />
|
94 | 118 | <call target="buildSln" />
|
95 | 119 | <property name="solutionFile" value="Management\Server\SuperSocket.ServerManager.Net45.csproj" />
|
96 | 120 | <call target="buildPrj" />
|
97 | 121 | <call target="cleanObjDir" />
|
98 | 122 |
|
99 |
| - <property name="netFxVersion" value="Net45" /> |
| 123 | + <property name="netFxVersion" value="net45" /> |
100 | 124 | <property name="configuration" value="Release" />
|
101 | 125 | <property name="solutionFile" value="SuperSocket.2012.sln" />
|
102 | 126 | <call target="buildSln" />
|
|
106 | 130 |
|
107 | 131 | <call target="zipBinaries" />
|
108 | 132 |
|
| 133 | + <call target="nugetPack" /> |
| 134 | + |
109 | 135 | </target>
|
110 | 136 | </project>
|
111 | 137 |
|
0 commit comments