diff --git a/Directory.Build.props b/Directory.Build.props index 8a5f9e6..1895eba 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,5 +7,21 @@ true $(NoWarn);1591 + + Frank R. Haugen + Frank R. Haugen + true + portable + true + Frank.PulseFlow + true + MIT + www.github.com/frankhaugen/Frank.PulseFlow + Frank.PulseFlow + www.github.com/frankhaugen/Frank.PulseFlow + + + + diff --git a/Frank.PulseFlow/Frank.PulseFlow.csproj b/Frank.PulseFlow/Frank.PulseFlow.csproj index ffaf9d8..dcde2e2 100644 --- a/Frank.PulseFlow/Frank.PulseFlow.csproj +++ b/Frank.PulseFlow/Frank.PulseFlow.csproj @@ -2,10 +2,10 @@ true - My awesome library - my,awesome,library + Library + PulseFlow uses Channel -mechanism for internal messaging + Pulse,Flow,PulseFlow Initial release - diff --git a/publish.ps1 b/publish.ps1 index 8b13789..4e1c315 100644 --- a/publish.ps1 +++ b/publish.ps1 @@ -1 +1,40 @@ +param ( + [Parameter(Mandatory=$false)] + [string]$version = (Get-Date -Format 'yyyy.MM.dd') +) +# Get directory of the script +$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Definition + +# Get path to the output directory +$outputDirectory = "$scriptDirectory/.artifacts" + +# Get path to the publish directory +$publishDirectory = "$outputDirectory/publish" + +# Get path to the package directory +$packageDirectory = "$outputDirectory/packages" + +# Get path to the project file +$projectFile = "$scriptDirectory/Frank.PulseFlow/Frank.PulseFlow.csproj" + +# Restore NuGet packages +Write-Host "Restoring NuGet packages..." -ForegroundColor DarkCyan +dotnet restore $projectFile | Out-Null + +# Clean output directories +if (Test-Path $publishDirectory) { Remove-Item "$publishDirectory/*" -Recurse } +if (Test-Path $packageDirectory) { Remove-Item "$packageDirectory/*" -Recurse } + +# Build the solution in the specified mode +Write-Host "Building solution in Release mode..." -ForegroundColor DarkCyan +dotnet build $projectFile --configuration Release --no-restore /p:Version=$version | Out-Null + +# Pack NuGet packages +Write-Host "Packing NuGet packages..." -ForegroundColor DarkCyan +dotnet pack $projectFile --configuration Release --output $packageDirectory --no-build /p:Version=$version /p:PackageVersion=$version | Out-Null + +# Publish the solution and pack NuGet packages +Write-Host "Publishing the project..." -ForegroundColor DarkCyan +dotnet publish $projectFile --configuration Release --output $publishDirectory --no-build /p:Version=$version /p:PackageVersion=$version | Out-Null +Write-Host "Project has been published." -ForegroundColor Green \ No newline at end of file