This repository has been archived by the owner on Feb 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89514dd
commit aab6062
Showing
7 changed files
with
121 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
param( | ||
[String] $majorMinor = "0.0", # 2.0 | ||
[String] $patch = "0", # $env:APPVEYOR_BUILD_VERSION | ||
[String] $customLogger = "", # C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll | ||
[Switch] $notouch, | ||
[String] $sln # e.g serilog-sink-name | ||
) | ||
|
||
function Set-AssemblyVersions($informational, $assembly) | ||
{ | ||
(Get-Content assets/CommonAssemblyInfo.cs) | | ||
ForEach-Object { $_ -replace """1.0.0.0""", """$assembly""" } | | ||
ForEach-Object { $_ -replace """1.0.0""", """$informational""" } | | ||
ForEach-Object { $_ -replace """1.1.1.1""", """$($informational).0""" } | | ||
Set-Content assets/CommonAssemblyInfo.cs | ||
} | ||
|
||
function Install-NuGetPackages($solution) | ||
{ | ||
nuget restore $solution | ||
} | ||
|
||
function Invoke-MSBuild($solution, $customLogger) | ||
{ | ||
if ($customLogger) | ||
{ | ||
msbuild "$solution" /verbosity:minimal /p:Configuration=Release /logger:"$customLogger" | ||
} | ||
else | ||
{ | ||
msbuild "$solution" /verbosity:minimal /p:Configuration=Release | ||
} | ||
} | ||
|
||
function Invoke-NuGetPackProj($csproj) | ||
{ | ||
nuget pack -Prop Configuration=Release -Symbols $csproj | ||
} | ||
|
||
function Invoke-NuGetPackSpec($nuspec, $version) | ||
{ | ||
nuget pack $nuspec -Version $version -OutputDirectory ..\..\ | ||
} | ||
|
||
function Invoke-NuGetPack($version) | ||
{ | ||
ls src/**/*.csproj | | ||
Where-Object { -not ($_.Name -like "*net40*") } | | ||
ForEach-Object { Invoke-NuGetPackProj $_ } | ||
} | ||
|
||
function Invoke-Build($majorMinor, $patch, $customLogger, $notouch, $sln) | ||
{ | ||
$package="$majorMinor.$patch" | ||
$slnfile = "$sln.sln" | ||
|
||
Write-Output "$sln $package" | ||
|
||
if (-not $notouch) | ||
{ | ||
$assembly = "$majorMinor.0.0" | ||
|
||
Write-Output "Assembly version will be set to $assembly" | ||
Set-AssemblyVersions $package $assembly | ||
} | ||
|
||
Install-NuGetPackages $slnfile | ||
|
||
Invoke-MSBuild $slnfile $customLogger | ||
|
||
Invoke-NuGetPack $package | ||
} | ||
|
||
$ErrorActionPreference = "Stop" | ||
|
||
if (-not $sln) | ||
{ | ||
$slnfull = ls *.sln | | ||
Where-Object { -not ($_.Name -like "*net40*") } | | ||
Select -first 1 | ||
|
||
$sln = $slnfull.BaseName | ||
} | ||
|
||
Invoke-Build $majorMinor $patch $customLogger $notouch $sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1.5 | ||
* Moved from serilog/serilog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using System.Reflection; | ||
|
||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.1.1.1")] | ||
[assembly: AssemblyInformationalVersion("1.0.0")] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2013 | ||
VisualStudioVersion = 12.0.31101.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.NLog", "src\Serilog.Sinks.NLog\Serilog.Sinks.NLog.csproj", "{9A3994D6-4CE1-4AF9-A43D-2AF324075B21}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{9A3994D6-4CE1-4AF9-A43D-2AF324075B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{9A3994D6-4CE1-4AF9-A43D-2AF324075B21}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{9A3994D6-4CE1-4AF9-A43D-2AF324075B21}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{9A3994D6-4CE1-4AF9-A43D-2AF324075B21}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters