Skip to content

Commit

Permalink
Modernize build infrastructure
Browse files Browse the repository at this point in the history
Use MinVer for versioning
Use SourceLink for source stepping
Use .NET Core SDK to build package
Build package during build
Sign assembly
  • Loading branch information
thomaslevesque committed Jan 4, 2020
1 parent 5beda83 commit 0326d13
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 65 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,4 @@ FakesAssemblies/
NDependOut/

issues/
artifacts/
5 changes: 0 additions & 5 deletions WpfAnimatedGif.Demo/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
using WpfAnimatedGif.Properties;

[assembly: AssemblyTitle("WpfAnimatedGif.Demo")]
[assembly: AssemblyDescription("")]
Expand All @@ -15,7 +14,3 @@
[assembly: ComVisible(false)]

[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]


[assembly: AssemblyVersion(VersionInfo.VersionString)]
[assembly: AssemblyFileVersion(VersionInfo.VersionString)]
2 changes: 2 additions & 0 deletions WpfAnimatedGif.Demo/WpfAnimatedGif.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<TargetFramework>netcoreapp3.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\WpfAnimatedGif\WpfAnimatedGif.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\WpfAnimatedGif\WpfAnimatedGif.csproj" />
Expand Down
27 changes: 0 additions & 27 deletions WpfAnimatedGif.nuspec

This file was deleted.

2 changes: 1 addition & 1 deletion WpfAnimatedGif.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfAnimatedGif.Demo", "WpfA
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0E0CF096-6B3E-4338-9DC7-7A52EE4D4648}"
ProjectSection(SolutionItems) = preProject
WpfAnimatedGif.nuspec = WpfAnimatedGif.nuspec
build.cmd = build.cmd
EndProjectSection
EndProject
Global
Expand Down
31 changes: 2 additions & 29 deletions WpfAnimatedGif/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows.Markup;
using WpfAnimatedGif.Properties;

[assembly: AssemblyTitle("WpfAnimatedGif")]
[assembly: AssemblyDescription("A library to display animated GIF images in WPF")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Thomas Levesque")]
[assembly: AssemblyProduct("WpfAnimatedGif")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: ComVisible(false)]

[assembly: Guid("a985ebe7-753b-4d73-b363-4b63d87f98b7")]

[assembly: AssemblyVersion(VersionInfo.VersionString)]
[assembly: AssemblyFileVersion(VersionInfo.VersionString)]
[assembly: AssemblyInformationalVersion(VersionInfo.VersionString)]

[assembly: XmlnsDefinition("http://wpfanimatedgif.codeplex.com", "WpfAnimatedGif")]
[assembly: XmlnsPrefix("http://wpfanimatedgif.codeplex.com", "gif")]

[assembly: InternalsVisibleTo("WpfAnimatedGif.Demo")]

namespace WpfAnimatedGif.Properties
{
class VersionInfo
{
/// <summary>
/// Single place to define version
/// </summary>
public const string VersionString = "1.4.18";
}
}
[assembly: InternalsVisibleTo(@"WpfAnimatedGif.Demo, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d1722da3c4f3f746217be0e9110926f0ea41dd90a8d8b2e7e344fec0e1d91af0c368e54b48088d88061f7d0b87124204b6b8a5a67d5011cd0415ddb553363cc1a0603181c6f935566e607c6ae99940bf1f82c0c45df953ad5df9bdd43353eec1dd1fe3d81ff020377a65e8976ef5fa3eeb767fbba528f3e915412e72a5bc0fca")]
20 changes: 19 additions & 1 deletion WpfAnimatedGif/WpfAnimatedGif.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,31 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>net35;net40;netcoreapp3.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>WpfAnimatedGif.snk</AssemblyOriginatorKeyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<PropertyGroup>
<Description>A library to display animated GIF images in WPF</Description>
<Title>WPF Animated GIF</Title>
<Authors>Thomas Levesque</Authors>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageProjectUrl>https://github.com/XamlAnimatedGif/WpfAnimatedGif</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/XamlAnimatedGif/WpfAnimatedGif/wiki/Change-log</PackageReleaseNotes>
<PackageTags>wpf;animated;gif</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="jnm2.ReferenceAssemblies.net35" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="MinVer" Version="2.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
Binary file added WpfAnimatedGif/WpfAnimatedGif.snk
Binary file not shown.
14 changes: 14 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '{build}'
branches:
only:
- master
pull_requests:
do_not_increment_build_number: true
image: Visual Studio 2019
nuget:
disable_publish_on_pr: true
build_script:
- cmd: build.cmd
test: off
artifacts:
- path: 'artifacts/**/*'
2 changes: 0 additions & 2 deletions build.bat

This file was deleted.

4 changes: 4 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
dotnet build -c Release /bl:artifacts/build.binlog
dotnet pack -c Release --no-build WpfAnimatedGif/WpfAnimatedGif.csproj -o artifacts /bl:artifacts/pack.binlog

0 comments on commit 0326d13

Please sign in to comment.