Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
assembly-versioning-scheme: MajorMinorPatchTag
mode: ContinuousDelivery
branches: {}
ignore:
sha: []
merge-message-formats: {}
9 changes: 9 additions & 0 deletions appveyor.gitversion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
install:
- choco install gitversion.portable -pre -y

before_build:
- nuget restore
- ps: gitversion /l console /output buildserver /updateAssemblyInfo

build:
project: scr\LogExpert.sln
18 changes: 11 additions & 7 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Nuke.Common.Tools.DotCover;
using Nuke.Common.Tools.ReportGenerator;
using Microsoft.Build.Execution;
using Nuke.Common;
using Nuke.Common.BuildServers;
using Nuke.Common.CI.AppVeyor;
using Nuke.Common.CI.AppVeyor.Configuration;
using Nuke.Common.Execution;
using Nuke.Common.Git;
using Nuke.Common.IO;
Expand All @@ -18,12 +21,10 @@
using Nuke.Common.Tools.GitVersion;
using Nuke.Common.Tools.NuGet;
using Nuke.Common.Tools.NUnit;
using Nuke.Common.Utilities;
using Nuke.Common.Utilities.Collections;
using Nuke.GitHub;
using static Nuke.Common.EnvironmentInfo;
using static Nuke.Common.IO.FileSystemTasks;
using static Nuke.Common.IO.PathConstruction;
using static Nuke.Common.Tools.MSBuild.MSBuildTasks;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.IO.TextTasks;
Expand All @@ -42,11 +43,13 @@ class Build : NukeBuild
/// - Microsoft VSCode https://nuke.build/vscode
public static int Main() => Execute<Build>(x => x.Test);

[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] private readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;

[Solution] readonly Solution Solution;
[GitRepository] readonly GitRepository GitRepository;
[GitVersion] readonly GitVersion GitVersion;
[GitVersion(UpdateBuildNumber = true)]
readonly Nuke.Common.Tools.GitVersion.GitVersion GitVersion;

AbsolutePath SourceDirectory => RootDirectory / "src";

Expand Down Expand Up @@ -80,15 +83,16 @@ Version Version
patch = AppVeyor.Instance.BuildNumber;
}

return new Version(1, 8, patch);
return new Version(1, 8, 8, patch);
}
}

[Parameter("Version string")]
string VersionString => $"{Version.Major}.{Version.Minor}.{Version.Build}";

[Parameter("Version Information string")]
string VersionInformationString => $"{VersionString}.Branch.{GitVersion.BranchName}.{GitVersion.Sha} {Configuration}";
//.Branch.{GitVersion.BranchName}.{GitVersion.Sha} removed for testing purpose
string VersionInformationString => $"{VersionString} {Configuration}";

[Parameter("Version file string")]
string VersionFileString => $"{Version.Major}.{Version.Minor}.0";
Expand Down
15 changes: 15 additions & 0 deletions build/Configuration/Configuration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.ComponentModel;

using Nuke.Common.Tooling;

[TypeConverter(typeof(TypeConverter<Configuration>))]
public class Configuration : Enumeration
{
public static Configuration Debug = new Configuration { Value = nameof(Debug) };
public static Configuration Release = new Configuration { Value = nameof(Release) };

public static implicit operator string(Configuration configuration)
{
return configuration.Value;
}
}
95 changes: 49 additions & 46 deletions build/_build.csproj
Original file line number Diff line number Diff line change
@@ -1,48 +1,51 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<RootNamespace></RootNamespace>
<IsPackable>False</IsPackable>
<NoWarn>CS0649;CS0169</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="chocolatey" Version="0.10.14" />
<PackageReference Include="GitVersion.CommandLine.DotNetCore" Version="5.0.1">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<RootNamespace></RootNamespace>
<IsPackable>False</IsPackable>
<NoWarn>CS0649;CS0169</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="chocolatey" Version="1.0.1" />
<PackageReference Include="GitVersion.CommandLine" Version="5.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitVersion.Core" Version="5.9.0" />
<PackageReference Include="NuGet.CommandLine" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="NuGet.CommandLine" Version="5.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Nuke.Common" Version="0.21.2" />
<PackageReference Include="Nuke.GitHub" Version="1.5.0" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.10.0" />
</ItemGroup>

<ItemGroup>
<NukeMetadata Include="**\*.json" Exclude="bin\**;obj\**" />
<NukeExternalFiles Include="**\*.*.ext" Exclude="bin\**;obj\**" />
<None Remove="*.csproj.DotSettings;*.ref.*.txt" />
<None Include="..\appveyor-release.yml" Link="appveyor-release.yml" />
<None Include="..\Build-DebugPack.ps1" Link="Build-DebugPack.ps1" />
<None Include="..\Build-ReleasePack.ps1" Link="Build-ReleasePack.ps1" />

<!-- Common build related files -->
<None Include="..\build.ps1" />
<None Include="..\build.sh" />
<None Include="..\.nuke" />
<None Include="..\global.json" Condition="Exists('..\global.json')" />
<None Include="..\nuget.config" Condition="Exists('..\nuget.config')" />
<None Include="..\azure-pipelines.yml" Condition="Exists('..\azure-pipelines.yml')" />
<None Include="..\Jenkinsfile" Condition="Exists('..\Jenkinsfile')" />
<None Include="..\appveyor.yml" Condition="Exists('..\appveyor.yml')" />
<None Include="..\.travis.yml" Condition="Exists('..\.travis.yml')" />
<None Include="..\GitVersion.yml" Condition="Exists('..\GitVersion.yml')" />
</ItemGroup>

</Project>
</PackageReference>
<PackageReference Include="Nuke.Common" Version="5.0.0" />
<PackageReference Include="Nuke.GitHub" Version="1.5.0" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.15.0" />
</ItemGroup>

<ItemGroup>
<NukeMetadata Include="**\*.json" Exclude="bin\**;obj\**" />
<NukeExternalFiles Include="**\*.*.ext" Exclude="bin\**;obj\**" />
<None Remove="*.csproj.DotSettings;*.ref.*.txt" />
<None Include="..\appveyor-release.yml" Link="appveyor-release.yml" />
<None Include="..\appveyor.gitversion.yml" Link="appveyor.gitversion.yml" />
<None Include="..\Build-DebugPack.ps1" Link="Build-DebugPack.ps1" />
<None Include="..\Build-ReleasePack.ps1" Link="Build-ReleasePack.ps1" />

<!-- Common build related files -->
<None Include="..\build.ps1" />
<None Include="..\build.sh" />
<None Include="..\.nuke" />
<None Include="..\global.json" Condition="Exists('..\global.json')" />
<None Include="..\nuget.config" Condition="Exists('..\nuget.config')" />
<None Include="..\azure-pipelines.yml" Condition="Exists('..\azure-pipelines.yml')" />
<None Include="..\Jenkinsfile" Condition="Exists('..\Jenkinsfile')" />
<None Include="..\appveyor.yml" Condition="Exists('..\appveyor.yml')" />
<None Include="..\.travis.yml" Condition="Exists('..\.travis.yml')" />
<None Include="..\GitVersion.yml" Condition="Exists('..\GitVersion.yml')" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/ColumnizerLib.UnitTests/ColumnizerLib.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="NUnit">
<Version>3.12.0</Version>
<Version>3.13.3</Version>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter">
<Version>3.15.1</Version>
<Version>4.2.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
2 changes: 1 addition & 1 deletion src/JsonColumnizer/JsonColumnizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.2</Version>
<Version>13.0.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
2 changes: 1 addition & 1 deletion src/JsonCompactColumnizer/JsonCompactColumnizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.2</Version>
<Version>13.0.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
6 changes: 3 additions & 3 deletions src/LogExpert.Tests/LogExpert.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Moq">
<Version>4.13.0</Version>
<Version>4.17.2</Version>
</PackageReference>
<PackageReference Include="NUnit">
<Version>3.12.0</Version>
<Version>3.13.3</Version>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter">
<Version>3.15.1</Version>
<Version>4.2.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
Loading