Merge pull request #335 from tgstation/SignTheFiles

Sign released binaries with a self signed cert
This commit is contained in:
Jordan Brown
2017-11-10 13:00:23 -05:00
committed by GitHub
20 changed files with 104 additions and 37 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ Instead you can use object orientation, or simply placing repeated code in a fun
### No magic numbers or strings
This means stuff like having a "mode" variable for an object set to "1" or "2" with no clear indicator of what that means. Make these #defines with a name that more clearly states what it's for. This is clearer and enhances readability of your code! Get used to doing it!
### Do not commit modifications to Version.cs
### Do not commit modifications to the version numbers in AssemblyInfo.global.cs
This file will be updated by maintainers when they deem it prudent to release a new version. For reference here is the version format we use 3.\<major\>.\<minor\>.\<patch\> The criteria for changing a version number is as follows
- Major: A breaking change to the DMAPI
+10
View File
@@ -0,0 +1,10 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//You cannot one definition the version number
//Believe me, I've tried, the compiler hates it so much
[assembly: AssemblyVersion("3.2.0.0")]
[assembly: AssemblyFileVersion("3.2.0.0")]
[assembly: AssemblyInformationalVersion("3.2.0.0")]
[assembly: InternalsVisibleTo("TGServiceTests")]
-3
View File
@@ -15,6 +15,3 @@ using System.Runtime.InteropServices;
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9ad1f086-a83e-4d14-a844-58a9471106b6")]
//allow the unit tester to peek inside us
[assembly: InternalsVisibleTo("TGServiceTests", AllInternalsVisible = true)]
+4 -1
View File
@@ -40,6 +40,9 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Compile Include="AdminCommands.cs" />
<Compile Include="BYONDCommands.cs" />
@@ -53,7 +56,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RepoCommands.cs" />
<Compile Include="RootCommands.cs" />
<Compile Include="..\Version.cs" />
<Compile Include="..\AssemblyInfo.global.cs" />
<Compile Include="ServiceCommands.cs" />
</ItemGroup>
<ItemGroup>
+4 -1
View File
@@ -39,6 +39,9 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
@@ -89,7 +92,7 @@
<Compile Include="ControlPanel\ServerPage.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="..\Version.cs" />
<Compile Include="..\AssemblyInfo.global.cs" />
<Compile Include="ControlPanel\StaticPage.cs">
<SubType>Form</SubType>
</Compile>
@@ -34,9 +34,12 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Compile Include="DreamDaemonBridge.cs" />
<Compile Include="..\Version.cs" />
<Compile Include="..\AssemblyInfo.global.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
+4 -1
View File
@@ -42,6 +42,9 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath>
@@ -66,7 +69,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="..\Version.cs" />
<Compile Include="..\AssemblyInfo.global.cs" />
<EmbeddedResource Include="Main.resx">
<DependentUpon>Main.cs</DependentUpon>
</EmbeddedResource>
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@@ -15,6 +14,3 @@ using System.Runtime.InteropServices;
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f32eda25-0855-411c-af5e-f0d042917e2d")]
//allow the unit tester to peek inside us
[assembly: InternalsVisibleTo("TGServiceTests", AllInternalsVisible = true)]
+7 -4
View File
@@ -41,14 +41,17 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="Discord.Net.Core, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Discord.Net.Core, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL">
<HintPath>..\packages\Discord.Net.Core.1.0.2\lib\net45\Discord.Net.Core.dll</HintPath>
</Reference>
<Reference Include="Discord.Net.Rest, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Discord.Net.Rest, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL">
<HintPath>..\packages\Discord.Net.Rest.1.0.2\lib\net45\Discord.Net.Rest.dll</HintPath>
</Reference>
<Reference Include="Discord.Net.WebSocket, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Discord.Net.WebSocket, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL">
<HintPath>..\packages\Discord.Net.WebSocket.1.0.2\lib\net45\Discord.Net.WebSocket.dll</HintPath>
</Reference>
<Reference Include="LibGit2Sharp, Version=1.0.22.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
@@ -125,7 +128,7 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="..\Version.cs" />
<Compile Include="..\AssemblyInfo.global.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config">
@@ -70,6 +70,12 @@
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="The WiX Toolset v3 build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<Target Name="AfterResolveReferences">
<Exec Command="powershell -Command $(SolutionDir)/Tools/SignBasics.ps1" />
</Target>
<PropertyGroup>
<PostBuildEvent>powershell -Command $(SolutionDir)/Tools/SignMSI.ps1</PostBuildEvent>
</PropertyGroup>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
+4 -1
View File
@@ -36,6 +36,9 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RegisterForComInterop>false</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Runtime.Serialization" />
@@ -62,7 +65,7 @@
<Compile Include="PullRequestInfo.cs" />
<Compile Include="RootCommand.cs" />
<Compile Include="Interface.cs" />
<Compile Include="..\Version.cs" />
<Compile Include="..\AssemblyInfo.global.cs" />
<Compile Include="Components\Service.cs" />
<Compile Include="Components\Interop.cs" />
</ItemGroup>
@@ -7,4 +7,3 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
[assembly: Guid("fb693ffb-17e3-4e84-8cbf-6ffa9c8fd971")]
+4
View File
@@ -37,6 +37,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll</HintPath>
@@ -70,6 +73,7 @@
<Compile Include="Service\TestServerInstance.cs" />
<Compile Include="Service\TestService.cs" />
<Compile Include="TempDirectoryRequiredTest.cs" />
<Compile Include="..\AssemblyInfo.global.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
+7 -2
View File
@@ -19,9 +19,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.gitignore = .gitignore
.travis.yml = .travis.yml
appveyor.yml = appveyor.yml
AssemblyInfo.global.cs = AssemblyInfo.global.cs
README.md = README.md
tgs.ico = tgs.ico
Version.cs = Version.cs
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TGInstallerWrapper", "TGInstallerWrapper\TGInstallerWrapper.csproj", "{8956D4C3-BFB9-448E-BF5F-EE7E6F9996F9}"
@@ -79,8 +79,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{081BB0BB
Tools\DMAPITravisTester.dme = Tools\DMAPITravisTester.dme
Tools\Doxyfile = Tools\Doxyfile
Tools\install_byond.sh = Tools\install_byond.sh
Tools\SignBasics.ps1 = Tools\SignBasics.ps1
Tools\SignMSI.ps1 = Tools\SignMSI.ps1
Tools\Test.dm = Tools\Test.dm
Tools\TGS3Build.ps1 = Tools\TGS3Build.ps1
Tools\tgstation13.org.pfx = Tools\tgstation13.org.pfx
Tools\UploadCoverage.ps1 = Tools\UploadCoverage.ps1
EndProjectSection
EndProject
@@ -115,10 +118,12 @@ Global
{AC4E7E8B-F83A-481C-A8B0-8FA4E8AE59AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC4E7E8B-F83A-481C-A8B0-8FA4E8AE59AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC4E7E8B-F83A-481C-A8B0-8FA4E8AE59AB}.Release|Any CPU.Build.0 = Release|Any CPU
{154435F6-0890-42D4-9AEC-B743D4FBC1CB}.Debug|Any CPU.ActiveCfg = Debug|x86
{154435F6-0890-42D4-9AEC-B743D4FBC1CB}.Debug|Any CPU.ActiveCfg = Release|x86
{154435F6-0890-42D4-9AEC-B743D4FBC1CB}.Debug|Any CPU.Build.0 = Release|x86
{154435F6-0890-42D4-9AEC-B743D4FBC1CB}.Release|Any CPU.ActiveCfg = Release|x86
{154435F6-0890-42D4-9AEC-B743D4FBC1CB}.Release|Any CPU.Build.0 = Release|x86
{8956D4C3-BFB9-448E-BF5F-EE7E6F9996F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8956D4C3-BFB9-448E-BF5F-EE7E6F9996F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8956D4C3-BFB9-448E-BF5F-EE7E6F9996F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8956D4C3-BFB9-448E-BF5F-EE7E6F9996F9}.Release|Any CPU.Build.0 = Release|Any CPU
{9A01EF03-8EAE-45CB-8B87-4A17BD904557}.Debug|Any CPU.ActiveCfg = Debug|x86
+17
View File
@@ -0,0 +1,17 @@
$bf = $Env:APPVEYOR_BUILD_FOLDER
function CodeSign
{
param($file)
&'C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe' sign /f "$bf/Tools/tgstation13.org.pfx" /p "$env:snk_passphrase" /t http://timestamp.verisign.com/scripts/timstamp.dll "$file"
}
#Sign the output files
if (Test-Path env:snk_passphrase)
{
CodeSign "$bf/TGCommandLine/bin/Release/TGCommandLine.exe"
CodeSign "$bf/TGControlPanel/bin/Release/TGControlPanel.exe"
CodeSign "$bf/TGServerService/bin/Release/TGServerService.exe"
CodeSign "$bf/TGDreamDaemonBridge/bin/x86/Release/TGDreamDaemonBridge.dll"
CodeSign "$bf/TGServiceInterface/bin/Release/TGServiceInterface.dll"
}
+13
View File
@@ -0,0 +1,13 @@
$bf = $Env:APPVEYOR_BUILD_FOLDER
function CodeSign
{
param($file)
&'C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe' sign /f "$bf/Tools/tgstation13.org.pfx" /p "$env:snk_passphrase" /t http://timestamp.verisign.com/scripts/timstamp.dll "$file"
}
#Sign the output files
if (Test-Path env:snk_passphrase)
{
CodeSign "$bf/TGServiceInstaller/bin/Release/TGServiceInstaller.msi"
}
+17
View File
@@ -1,4 +1,20 @@
$bf = $Env:APPVEYOR_BUILD_FOLDER
function CodeSign
{
param($file)
&'C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe' sign /f "$bf/Tools/tgstation13.org.pfx" /p "$env:snk_passphrase" /t http://timestamp.verisign.com/scripts/timstamp.dll "$file"
}
#Sign the output files
if (Test-Path env:snk_passphrase)
{
CodeSign "$bf/TGServiceTests/bin/Release/TGServiceTests.dll"
CodeSign "$bf/TGInstallerWrapper/bin/Release/TG Station Server Installer.exe"
$env:snk_passphrase = ""
}
$src = "$bf\TGInstallerWrapper\bin\Release"
$version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$src\TG Station Server Installer.exe").FileVersion
@@ -33,6 +49,7 @@ if($publish_dox){
git add --all
git commit -m "Deploy code docs to GitHub Pages for Appveyor build $Env:APPVEYOR_BUILD_NUMBER" -m "Commit: $Env:APPVEYOR_REPO_COMMIT"
git push -f "https://$Env:repo_token@$github_url" 2>&1 | out-null
$Env:repo_token = ""
cd "$bf"
}
Binary file not shown.
-17
View File
@@ -1,17 +0,0 @@
using System.Reflection;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
//It's impossible to make these a define, don't say I didn't warn you
[assembly: AssemblyVersion("3.2.0.0")]
[assembly: AssemblyFileVersion("3.2.0.0")]
[assembly: AssemblyInformationalVersion("3.2.0.0")]
+2
View File
@@ -3,6 +3,8 @@ pull_requests:
environment:
repo_token:
secure: lJNGAXwiB5HlWdthz3K4PetqpTG5IEAyRgKaiKxFMQ8HW8CcOjRtB97B05op7BsK
snk_passphrase:
secure: dsRGlNewYn/JoycPaMoxLCrb3wkL31RsdU7Xwbo7TIAmClwShCVWeRPN+eGA+fMZX12MDNRBs8Fws4IxqLKQ36thQo6p2B+kPksAUJiAOR5QKJoT6nt8JB1wBMFS2kH4
skip_branch_with_pr: true
image: Visual Studio 2017
configuration: Release