From fe7f8d1a72f9e1da984a4e3d7262848e51acf7d0 Mon Sep 17 00:00:00 2001 From: Jason Regnier <jason.regnier4@gmail.com> Date: Wed, 25 Nov 2020 23:26:03 -0500 Subject: [PATCH] Adding GitVersion --- GitVersion.yml | 5 +++++ build/Build.cs | 6 +++++- src/MtgApiManager.Lib/MtgApiManager.Lib.csproj | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 GitVersion.yml diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000..ed16160 --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,5 @@ +mode: ContinuousDelivery +branches: {} +ignore: + sha: [] +merge-message-formats: {} diff --git a/build/Build.cs b/build/Build.cs index a8f1e99..d537eac 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -99,11 +99,15 @@ internal class Build : NukeBuild private Target Pack => _ => _ .DependsOn(PublishCodeCoverage) + .Requires(() => Configuration == Configuration.Release) .Executes(() => { DotNetPack(s => s + .EnableNoRestore() + .EnableNoBuild() .SetProject(Solution.GetProject("MtgApiManager.Lib")) .SetConfiguration(Configuration) - .SetOutputDirectory(ArtifactsDirectory)); + .SetOutputDirectory(ArtifactsDirectory) + .SetVersion(GitVersion.NuGetVersionV2)); }); } \ No newline at end of file diff --git a/src/MtgApiManager.Lib/MtgApiManager.Lib.csproj b/src/MtgApiManager.Lib/MtgApiManager.Lib.csproj index a8374c8..42f6379 100644 --- a/src/MtgApiManager.Lib/MtgApiManager.Lib.csproj +++ b/src/MtgApiManager.Lib/MtgApiManager.Lib.csproj @@ -16,7 +16,6 @@ <NeutralLanguage>en</NeutralLanguage> <PackageIcon>icon.png</PackageIcon> <PackageLicenseExpression>MIT</PackageLicenseExpression> - <Version>1.2.3</Version> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> @@ -25,6 +24,10 @@ <DocumentationFile>C:\Dev\code\mtg-sdk-dotnet\src\MtgApiManager.Lib\MtgApiManager.Lib.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DocumentationFile>C:\Dev\code\mtg-sdk-dotnet\src\MtgApiManager.Lib\MtgApiManager.Lib.xml</DocumentationFile> + </PropertyGroup> + <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <DesignTime>True</DesignTime>