Skip to content

Commit

Permalink
v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vcsjones committed Dec 22, 2017
1 parent 2e5044e commit 1838909
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,6 @@ __pycache__/
*.btm.cs
*.odx.cs
*.xsd.cs

# Build
out/
2 changes: 1 addition & 1 deletion AzureSignTool/AzureSignTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net471</TargetFramework>
<LangVersion>latest</LangVersion>
<PlatformTarget>anycpu</PlatformTarget>
<VersionPrefix>0.11.0</VersionPrefix>
<VersionPrefix>1.0.0</VersionPrefix>
<Authors>Kevin Jones</Authors>
<Description>Azure SignTool</Description>
<SignAssembly>true</SignAssembly>
Expand Down
54 changes: 54 additions & 0 deletions build/build.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProductName>AzureSignTool</ProductName>
<ProductUrl>https://vcsjones.com/azuresigntool</ProductUrl>
<ProductCompanyName>Kevin Jones</ProductCompanyName>
</PropertyGroup>
<PropertyGroup>
<OutputDir>$(MSBuildThisFileDirectory)..\out\</OutputDir>
<OutZip>$(OutputDir)AzureSignTool.zip</OutZip>
</PropertyGroup>
<Target Name="Build" DependsOnTargets="Clean">
<ItemGroup>
<AzureSignToolSolution Include="$(MSBuildThisFileDirectory)..\AzureSignTool\AzureSignTool.csproj">
<Properties>OutputPath=$(OutputDir);Configuration=Release</Properties>
</AzureSignToolSolution>
</ItemGroup>
<MSBuild Targets="Rebuild" Projects="@(AzureSignToolSolution)">
<Output ItemName="ProjectOutputs" TaskParameter="TargetOutputs"/>
</MSBuild>
</Target>
<Target Name="Sign" DependsOnTargets="Build">
<Exec Command="signtool.exe sign /sha1 f6672884bad63d294eacaebec3c2a619e7b72b68 /nosealwarn /d &quot;$(ProductName)&quot; /du $(ProductUrl) /n &quot;$(ProductCompanyName)&quot; /itos /ph /tr http://timestamp.digicert.com /fd SHA256 /td SHA256 &quot;$(OutputDir)\AzureSignTool.exe&quot;" />
<Exec Command="signtool.exe sign /sha1 f6672884bad63d294eacaebec3c2a619e7b72b68 /seal /tseal http://timestamp.digicert.com /td SHA256 &quot;$(OutputDir)\AzureSignTool.exe&quot;" />
</Target>
<Target Name="Package" DependsOnTargets="Sign">
<Zip InputDirectory="$(OutputDir)" OutputFile="$(OutZip)" />
</Target>
<Target Name="Clean">
<RemoveDir Directories="$(OutputDir)" Condition="Exists($(OutputDir))" />
</Target>

<UsingTask
TaskName="Zip"
TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<InputDirectory ParameterType="System.String" Required="true" />
<OutputFile ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.IO.Compression.FileSystem" />
<Using Namespace="System.IO" />
<Using Namespace="System.IO.Compression" />
<Code Type="Fragment" Language="cs">
<![CDATA[
var path = Path.Combine(Path.GetTempPath(), System.Guid.NewGuid().ToString("D") + ".zip");
ZipFile.CreateFromDirectory(InputDirectory, path);
File.Move(path, OutputFile);
]]>
</Code>
</Task>
</UsingTask>
</Project>

0 comments on commit 1838909

Please sign in to comment.