Skip to content

Commit

Permalink
NuGet scripts and build targets updated
Browse files Browse the repository at this point in the history
  • Loading branch information
falahati committed Jul 13, 2017
1 parent 6821a54 commit 85e15c7
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 24 deletions.
17 changes: 17 additions & 0 deletions NuGet.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="AfterBuild">
<GetAssemblyIdentity AssemblyFiles="$(OutputPath)$(AssemblyName).dll">
<Output TaskParameter="Assemblies" ItemName="OutputAssemblyInfo" />
</GetAssemblyIdentity>
<Message Text="Info: %(OutputAssemblyInfo.Version)" />
</Target>
<Target Name="Package">
<RemoveDir Directories="NuGet" />
<MakeDir Directories="NuGet" />
<Exec WorkingDirectory="$(BuildDir)" Command="NuGet.exe pack &quot;$(ProjectName).csproj&quot; -Verbosity detailed -Symbols -OutputDir &quot;NuGet&quot; -Version &quot;%(OutputAssemblyInfo.Version)&quot; -Properties &quot;Configuration=$(Configuration)&quot; -IncludeReferencedProjects" />
</Target>
<Target Name="Publish">
<Exec WorkingDirectory="$(BuildDir)" Command="NuGet.exe push &quot;NuGet\$(AssemblyName).%(OutputAssemblyInfo.Version).nupkg&quot; -Verbosity detailed -Source &quot;https://www.nuget.org/api/v2/package&quot;" />
</Target>
</Project>
Binary file added WindowsFirewallHelper/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions WindowsFirewallHelper/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

[assembly: AssemblyTitle("Windows Firewall Helper")]
[assembly: AssemblyTitle("WindowsFirewallHelper")]
[assembly:
AssemblyDescription(
"A .Net library to add or remove your program to the windows firewall exception list as well as managing the permitted protocols and ports"
"A class library to manage the Windows Firewall as well as adding your program to the Windows Firewall Exception list. Supporting Windows XP+."
)]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Soroush Falahati")]
[assembly: AssemblyProduct("Windows Firewall Helper")]
[assembly: AssemblyProduct("WindowsFirewallHelper")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
Expand All @@ -38,5 +38,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
7 changes: 6 additions & 1 deletion WindowsFirewallHelper/WindowsFirewallHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,13 @@
<Compile Include="IRule.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Icon.png" />
<None Include="readme.txt" />
</ItemGroup>
<ItemGroup>
<None Include="WindowsFirewallHelper.nuspec" />
<None Include="WindowsFirewallHelper.targets" />
</ItemGroup>
<ItemGroup>
<COMReference Include="NetFwTypeLib">
<Guid>{58FBCF7C-E7A9-467C-80B3-FC65E8FCCA08}</Guid>
Expand All @@ -97,5 +102,5 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(AssemblyName).targets" />
<Import Project="../NuGet.targets" />
</Project>
11 changes: 7 additions & 4 deletions WindowsFirewallHelper/WindowsFirewallHelper.nuspec
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>WindowsFirewallHelper</id>
<version>0.0</version>
<id>$id$</id>
<version>$version$</version>
<title>Windows Firewall Helper (Win XP+)</title>
<authors>Soroush Falahati</authors>
<licenseUrl>https://github.com/falahati/WindowsFirewallHelper/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/falahati/WindowsFirewallHelper</projectUrl>
<iconUrl>https://github.com/falahati/WindowsFirewallHelper/blob/master/WindowsFirewallHelper/Icon.png?raw=true</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>A class library to manage the Windows Firewall as well as adding your program to the Windows Firewall Exception list. Supporting Windows XP+.</description>
<description>$description$</description>
<language>en-US</language>
</metadata>
<files>
<file src="readme.txt" target="" />
<file src="bin/Release/Interop.NetFwTypeLib.dll" target="lib\net20" />
<file src="Icon.png" target="" />
<file src="WindowsFirewallHelper.targets" target="build" />
<file src=".\bin\Release\Interop.NetFwTypeLib.dll" target="build" />
</files>
</package>
21 changes: 7 additions & 14 deletions WindowsFirewallHelper/WindowsFirewallHelper.targets
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="AfterBuild">
<GetAssemblyIdentity AssemblyFiles="$(OutputPath)$(AssemblyName).dll">
<Output TaskParameter="Assemblies" ItemName="OutputAssemblyInfo" />
</GetAssemblyIdentity>
<Message Text="Info: %(OutputAssemblyInfo.Version)" />
</Target>
<Target Name="Package">
<RemoveDir Directories="NuGet" />
<MakeDir Directories="NuGet" />
<Exec WorkingDirectory="$(BuildDir)" Command="NuGet.exe pack -Verbosity detailed -Symbols -OutputDir &quot;NuGet&quot; -Version %(OutputAssemblyInfo.Version) -Properties &quot;Configuration=$(Configuration)&quot;" />
</Target>
<Target Name="Publish">
<Exec WorkingDirectory="$(BuildDir)" Command="NuGet.exe push &quot;NuGet\$(AssemblyName).%(OutputAssemblyInfo.Version).nupkg&quot; -Verbosity detailed" />
</Target>
<ItemGroup>
<NativeLibs Include="$(MSBuildThisFileDirectory)*.dll" />
<None Include="@(NativeLibs)">
<Link>%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$msbuild = join-path -path (Get-ItemProperty "HKLM:\software\Microsoft\MSBuild\ToolsVersions\14.0")."MSBuildToolsPath" -childpath "msbuild.exe"
&$msbuild WindowsFirewallHelper\WindowsFirewallHelper.csproj /t:Build /t:Package /t:Publish /p:Configuration="Release"
&$msbuild WindowsFirewallHelper\WindowsFirewallHelper.csproj /t:Build /t:Package /p:Configuration="Release"
2 changes: 2 additions & 0 deletions publish.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$msbuild = join-path -path (Get-ItemProperty "HKLM:\software\Microsoft\MSBuild\ToolsVersions\14.0")."MSBuildToolsPath" -childpath "msbuild.exe"
&$msbuild WindowsFirewallHelper\WindowsFirewallHelper.csproj /t:Build /t:Package /t:Publish /p:Configuration="Release"

0 comments on commit 85e15c7

Please sign in to comment.