Skip to content

Commit 2b6ce4f

Browse files
committed
Unified versions.
1 parent 599a98b commit 2b6ce4f

19 files changed

Lines changed: 77 additions & 171 deletions

File tree

‎Jenkinsfile‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node {
22
stage('Checkout') {
33
checkout scm
4+
bat 'git pull --tags'
45
}
56

67
stage('Acquire SE') {
@@ -14,7 +15,7 @@ node {
1415
}
1516

1617
stage('Build') {
17-
bat "\"${tool 'MSBuild'}msbuild\" Torch.sln /p:Configuration=Release /p:Platform=x64 /t:TransformOnBuild"
18+
currentBuild.description = bat(returnStdout: true, script: '@powershell -File Versioning/version.ps1').trim()
1819
bat "\"${tool 'MSBuild'}msbuild\" Torch.sln /p:Configuration=Release /p:Platform=x64"
1920
}
2021

@@ -37,9 +38,20 @@ node {
3738
}
3839

3940
stage('Archive') {
40-
bat "IF EXIST bin\\torch-${BRANCH_NAME}.zip DEL bin\\torch-${BRANCH_NAME}.zip"
41-
bat "powershell -Command \"Add-Type -Assembly System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::CreateFromDirectory(\\\"\$PWD\\bin\\x64\\Release\\\", \\\"\$PWD\\bin\\torch-${BRANCH_NAME}.zip\\\")\""
42-
archiveArtifacts artifacts: 'bin/torch-${BRANCH_NAME}.zip', caseSensitive: false, fingerprint: true, onlyIfSuccessful: true
41+
bat '''IF EXIST bin\\torch-server.zip DEL bin\\torch-server.zip
42+
IF EXIST bin\\package-server RMDIR /S /Q bin\\package-server
43+
xcopy bin\\x64\\Release bin\\package-server\\
44+
del bin\\package-server\\Torch.Client*'''
45+
bat "powershell -Command \"Add-Type -Assembly System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::CreateFromDirectory(\\\"\$PWD\\bin\\package-server\\\", \\\"\$PWD\\bin\\torch-server.zip\\\")\""
46+
archiveArtifacts artifacts: 'bin/torch-server.zip', caseSensitive: false, onlyIfSuccessful: true
47+
48+
bat '''IF EXIST bin\\torch-client.zip DEL bin\\torch-client.zip
49+
IF EXIST bin\\package-client RMDIR /S /Q bin\\package-client
50+
xcopy bin\\x64\\Release bin\\package-client\\
51+
del bin\\package-client\\Torch.Server*'''
52+
bat "powershell -Command \"Add-Type -Assembly System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::CreateFromDirectory(\\\"\$PWD\\bin\\package-client\\\", \\\"\$PWD\\bin\\torch-client.zip\\\")\""
53+
archiveArtifacts artifacts: 'bin/torch-client.zip', caseSensitive: false, onlyIfSuccessful: true
54+
4355
archiveArtifacts artifacts: 'bin/x64/Release/Torch*', caseSensitive: false, fingerprint: true, onlyIfSuccessful: true
4456
}
4557
}

‎Torch.API/Properties/AssemblyInfoGen.tt‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎Torch.API/Torch.API.csproj‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@
156156
</Reference>
157157
</ItemGroup>
158158
<ItemGroup>
159+
<Compile Include="..\Versioning\AssemblyVersion.cs">
160+
<Link>Properties\AssemblyVersion.cs</Link>
161+
</Compile>
159162
<Compile Include="ConnectionState.cs" />
160163
<Compile Include="IChatMessage.cs" />
161164
<Compile Include="ITorchConfig.cs" />
@@ -175,11 +178,6 @@
175178
<Compile Include="ModAPI\Ingame\GridExtensions.cs" />
176179
<Compile Include="Plugins\PluginAttribute.cs" />
177180
<Compile Include="Properties\AssemblyInfo.cs" />
178-
<Compile Include="Properties\AssemblyInfoGen.cs">
179-
<DependentUpon>AssemblyInfoGen.tt</DependentUpon>
180-
<AutoGen>True</AutoGen>
181-
<DesignTime>True</DesignTime>
182-
</Compile>
183181
<Compile Include="ServerState.cs" />
184182
<Compile Include="ModAPI\TorchAPI.cs" />
185183
<Compile Include="Session\ITorchSession.cs" />
@@ -188,12 +186,6 @@
188186
<ItemGroup>
189187
<None Include="packages.config" />
190188
</ItemGroup>
191-
<ItemGroup>
192-
<None Include="Properties\AssemblyInfoGen.tt">
193-
<Generator>TextTemplatingFileGenerator</Generator>
194-
<LastGenOutput>AssemblyInfoGen.cs</LastGenOutput>
195-
</None>
196-
</ItemGroup>
197189
<ItemGroup>
198190
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
199191
</ItemGroup>

‎Torch.Client.Tests/Properties/AssemblyInfoGen.tt‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎Torch.Client.Tests/Torch.Client.Tests.csproj‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@
6060
</Reference>
6161
</ItemGroup>
6262
<ItemGroup>
63-
<Compile Include="Properties\AssemblyInfo.cs" />
64-
<Compile Include="Properties\AssemblyInfoGen.cs">
65-
<DependentUpon>AssemblyInfoGen.tt</DependentUpon>
66-
<AutoGen>True</AutoGen>
67-
<DesignTime>True</DesignTime>
63+
<Compile Include="..\Versioning\AssemblyVersion.cs">
64+
<Link>Properties\AssemblyVersion.cs</Link>
6865
</Compile>
66+
<Compile Include="Properties\AssemblyInfo.cs" />
6967
<Compile Include="TorchClientReflectionTest.cs" />
7068
</ItemGroup>
7169
<ItemGroup>
@@ -90,12 +88,6 @@
9088
<ItemGroup>
9189
<None Include="packages.config" />
9290
</ItemGroup>
93-
<ItemGroup>
94-
<None Include="Properties\AssemblyInfoGen.tt">
95-
<Generator>TextTemplatingFileGenerator</Generator>
96-
<LastGenOutput>AssemblyInfoGen.cs</LastGenOutput>
97-
</None>
98-
</ItemGroup>
9991
<ItemGroup>
10092
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
10193
</ItemGroup>

‎Torch.Client/Properties/AssemblyInfoGen.tt‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎Torch.Client/Torch.Client.csproj‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,10 @@
118118
<Reference Include="PresentationFramework" />
119119
</ItemGroup>
120120
<ItemGroup>
121-
<Compile Include="Properties\AssemblyInfo.cs" />
122-
<Compile Include="Properties\AssemblyInfoGen.cs">
123-
<DependentUpon>AssemblyInfoGen.tt</DependentUpon>
124-
<AutoGen>True</AutoGen>
125-
<DesignTime>True</DesignTime>
121+
<Compile Include="..\Versioning\AssemblyVersion.cs">
122+
<Link>Properties\AssemblyVersion.cs</Link>
126123
</Compile>
124+
<Compile Include="Properties\AssemblyInfo.cs" />
127125
<Compile Include="TorchClient.cs" />
128126
<Compile Include="TorchClientConfig.cs" />
129127
<Compile Include="TorchConsoleScreen.cs" />
@@ -169,12 +167,6 @@
169167
<ItemGroup>
170168
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
171169
</ItemGroup>
172-
<ItemGroup>
173-
<None Include="Properties\AssemblyInfoGen.tt">
174-
<Generator>TextTemplatingFileGenerator</Generator>
175-
<LastGenOutput>AssemblyInfoGen.cs</LastGenOutput>
176-
</None>
177-
</ItemGroup>
178170
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
179171
<Import Project="$(SolutionDir)\TransformOnBuild.targets" />
180172
<PropertyGroup>

‎Torch.Server.Tests/Properties/AssemblyInfoGen.tt‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎Torch.Server.Tests/Torch.Server.Tests.csproj‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@
6060
</Reference>
6161
</ItemGroup>
6262
<ItemGroup>
63-
<Compile Include="Properties\AssemblyInfo.cs" />
64-
<Compile Include="Properties\AssemblyInfoGen.cs">
65-
<DependentUpon>AssemblyInfoGen.tt</DependentUpon>
66-
<AutoGen>True</AutoGen>
67-
<DesignTime>True</DesignTime>
63+
<Compile Include="..\Versioning\AssemblyVersion.cs">
64+
<Link>Properties\AssemblyVersion.cs</Link>
6865
</Compile>
66+
<Compile Include="Properties\AssemblyInfo.cs" />
6967
<Compile Include="TorchServerReflectionTest.cs" />
7068
</ItemGroup>
7169
<ItemGroup>
@@ -90,12 +88,6 @@
9088
<ItemGroup>
9189
<None Include="packages.config" />
9290
</ItemGroup>
93-
<ItemGroup>
94-
<None Include="Properties\AssemblyInfoGen.tt">
95-
<Generator>TextTemplatingFileGenerator</Generator>
96-
<LastGenOutput>AssemblyInfoGen.cs</LastGenOutput>
97-
</None>
98-
</ItemGroup>
9991
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
10092
<Import Project="$(SolutionDir)\TransformOnBuild.targets" />
10193
</Project>

‎Torch.Server/Properties/AssemblyInfoGen.tt‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)