Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Commit

Permalink
cBuild: Add strong naming again and simplify versioning and push
Browse files Browse the repository at this point in the history
Related: #62
  • Loading branch information
paiden committed Oct 14, 2018
1 parent ffa4cf3 commit e823d88
Show file tree
Hide file tree
Showing 26 changed files with 177 additions and 228 deletions.
6 changes: 6 additions & 0 deletions Infrastructure/Nett.Signer/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
82 changes: 82 additions & 0 deletions Infrastructure/Nett.Signer/Nett.Signer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{031FC227-9F94-4EF6-85CA-7A36E142C319}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Nett.Signer</RootNamespace>
<AssemblyName>Nett.Signer</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Brutal.Dev.StrongNameSigner, Version=1.4.2.0, Culture=neutral, PublicKeyToken=a13519261d199c73, processorArchitecture=MSIL">
<HintPath>..\..\Solutions\Nett\packages\Signature.Core.1.0.1.0\lib\net45\Brutal.Dev.StrongNameSigner.dll</HintPath>
</Reference>
<Reference Include="CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<HintPath>..\..\Solutions\Nett\packages\CommandLineParser20.2.0.0.0\lib\net40\CommandLine.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.XmlTransform, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\Solutions\Nett\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\..\Solutions\Nett\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Mdb, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\..\Solutions\Nett\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Pdb, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\..\Solutions\Nett\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Rocks, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\..\Solutions\Nett\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
</Reference>
<Reference Include="NuGet.Core, Version=2.8.50506.491, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\Solutions\Nett\packages\NuGet.Core.2.8.2\lib\net40-Client\NuGet.Core.dll</HintPath>
</Reference>
<Reference Include="Signature.Core, Version=1.0.1.0, Culture=neutral, PublicKeyToken=4f2ff6084b188fa9, processorArchitecture=MSIL">
<HintPath>..\..\Solutions\Nett\packages\Signature.Core.1.0.1.0\lib\net45\Signature.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
31 changes: 31 additions & 0 deletions Infrastructure/Nett.Signer/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using CommandLine;
using Signature.Core;

namespace Nett.Signer
{
public sealed class Options
{
[Option('i', "input", DefaultValue = "", HelpText = "Input NuGet package", Required = true)]
public string Input { get; set; }

[Option('o', "output", DefaultValue = "", HelpText = "Output NuGet package name", Required = true)]
public string Output { get; set; }

[Option('p', "spid", DefaultValue = "", HelpText = "Strong Named package ID", Required = true)]
public string StrongNamedPackageId { get; set; }

[Option('k', "keyfile", DefaultValue = "", HelpText = "Key file (snk/pfx)", Required = true)]
public string KeyFile { get; set; }
}

public sealed class Program
{
static void Main(string[] args)
{
var o = CommandLine.Parser.Default.ParseArguments<Options>(args).Value;
var signer = new PackageSigner();

signer.SignPackage(o.Input, o.Output, o.KeyFile, "", o.StrongNamedPackageId);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Nett")]
[assembly: AssemblyTitle("Nett.Signer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Nett")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyProduct("Nett.Signer")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("11e1bd88-fab6-407d-b3ef-42a291d4aa14")]
[assembly: Guid("031fc227-9f94-4ef6-85ca-7a36e142c319")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// 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.*")]
[assembly: AssemblyVersion("1.0.0.0")]
Expand Down
8 changes: 8 additions & 0 deletions Infrastructure/Nett.Signer/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommandLineParser20" version="2.0.0.0" targetFramework="net461" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net461" />
<package id="Mono.Cecil" version="0.9.5.4" targetFramework="net461" />
<package id="NuGet.Core" version="2.8.2" targetFramework="net461" />
<package id="Signature.Core" version="1.0.1.0" targetFramework="net461" />
</packages>
Binary file not shown.
24 changes: 0 additions & 24 deletions Infrastructure/Signer/Brutal.Dev.StrongNameSigner.targets

This file was deleted.

Binary file removed Infrastructure/Signer/Mono.Cecil.Mdb.dll
Binary file not shown.
Binary file removed Infrastructure/Signer/Mono.Cecil.Pdb.dll
Binary file not shown.
Binary file removed Infrastructure/Signer/Mono.Cecil.Rocks.dll
Binary file not shown.
Binary file removed Infrastructure/Signer/Mono.Cecil.dll
Binary file not shown.
Binary file removed Infrastructure/Signer/PowerArgs.dll
Binary file not shown.
Binary file not shown.
4 changes: 1 addition & 3 deletions Shared.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NettVersion>0.9.0</NettVersion>
<ComaVersion>0.9.0</ComaVersion>
<AspNetVersion>0.9.0</AspNetVersion>
<Version>0.9.2</Version>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Infrastructure/Nett.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
</Project>
12 changes: 12 additions & 0 deletions Solutions/Nett/Nett.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nett", "..\..\Source\Nett\Nett.csproj", "{11E1BD88-FAB6-407D-B3EF-42A291D4AA14}"
ProjectSection(ProjectDependencies) = postProject
{031FC227-9F94-4EF6-85CA-7A36E142C319} = {031FC227-9F94-4EF6-85CA-7A36E142C319}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E524EAFD-2545-4294-A49C-E05200F9363F}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -40,6 +43,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nett.AspNet.SystemTests", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nett.AspNet", "..\..\Source\Nett.AspNet\Nett.AspNet.csproj", "{B725009F-78A1-4587-9BAB-7DD09FF31DE4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infra", "Infra", "{1ADBAA98-827C-4E4A-935F-848498A9AEBB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nett.Signer", "..\..\Infrastructure\Nett.Signer\Nett.Signer.csproj", "{031FC227-9F94-4EF6-85CA-7A36E142C319}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -90,6 +97,10 @@ Global
{B725009F-78A1-4587-9BAB-7DD09FF31DE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B725009F-78A1-4587-9BAB-7DD09FF31DE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B725009F-78A1-4587-9BAB-7DD09FF31DE4}.Release|Any CPU.Build.0 = Release|Any CPU
{031FC227-9F94-4EF6-85CA-7A36E142C319}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{031FC227-9F94-4EF6-85CA-7A36E142C319}.Debug|Any CPU.Build.0 = Debug|Any CPU
{031FC227-9F94-4EF6-85CA-7A36E142C319}.Release|Any CPU.ActiveCfg = Release|Any CPU
{031FC227-9F94-4EF6-85CA-7A36E142C319}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -103,6 +114,7 @@ Global
{57E5A8B7-F789-4E16-AFFA-A78F5B460861} = {9A668C41-A34B-4E30-9D2A-B903C9D4985D}
{43F48E90-2FA1-4DD7-A4CF-9EB6DB078A76} = {9A668C41-A34B-4E30-9D2A-B903C9D4985D}
{D2A875E3-B324-4125-BC76-10EE039AF9C9} = {9A668C41-A34B-4E30-9D2A-B903C9D4985D}
{031FC227-9F94-4EF6-85CA-7A36E142C319} = {1ADBAA98-827C-4E4A-935F-848498A9AEBB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {103717AC-2FA6-462C-A42E-BAEA4AC47635}
Expand Down
11 changes: 0 additions & 11 deletions Solutions/Nett/Nett/Class1.cs

This file was deleted.

59 changes: 0 additions & 59 deletions Solutions/Nett/Nett/Nett.csproj

This file was deleted.

25 changes: 0 additions & 25 deletions Solutions/Nett/WebApplication1/Program.cs

This file was deleted.

27 changes: 0 additions & 27 deletions Solutions/Nett/WebApplication1/Properties/launchSettings.json

This file was deleted.

Loading

0 comments on commit e823d88

Please sign in to comment.