Use powershell script to publish and zip libation

This commit is contained in:
Michael Bucari-Tovo 2022-06-26 01:16:17 -06:00
parent a8987cf1d3
commit 6826237657
3 changed files with 16 additions and 5 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
<EnablePreviewFeatures>True</EnablePreviewFeatures> <EnablePreviewFeatures>True</EnablePreviewFeatures>
<Version>8.1.4.30</Version> <Version>8.1.4.31</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Octokit" Version="0.51.0" /> <PackageReference Include="Octokit" Version="0.51.0" />

View File

@ -1,4 +0,0 @@
rmdir bin\Publish /S /Q
dotnet publish -c Release LibationWinForms\LibationWinForms.csproj -p:PublishProfile=LibationWinForms\Properties\PublishProfiles\FolderProfile.pubxml
dotnet publish -c Release LibationCli\LibationCli.csproj -p:PublishProfile=LibationCli\Properties\PublishProfiles\FolderProfile.pubxml
dotnet publish -c Release Hangover\Hangover.csproj -p:PublishProfile=Hangover\Properties\PublishProfiles\FolderProfile.pubxml

15
Source/publish.ps1 Normal file
View File

@ -0,0 +1,15 @@
<# You must enable running powershell scripts.
Set-ExecutionPolicy -Scope CurrentUser Unrestricted
#>
$pubDir = "bin\Publish"
Remove-Item $pubDir -Recurse -Force
dotnet publish -c Release LibationWinForms\LibationWinForms.csproj -p:PublishProfile=LibationWinForms\Properties\PublishProfiles\FolderProfile.pubxml
dotnet publish -c Release LibationCli\LibationCli.csproj -p:PublishProfile=LibationCli\Properties\PublishProfiles\FolderProfile.pubxml
dotnet publish -c Release Hangover\Hangover.csproj -p:PublishProfile=Hangover\Properties\PublishProfiles\FolderProfile.pubxml
$verMatch = Select-String -Path 'AppScaffolding\AppScaffolding.csproj' -Pattern '<Version>(\d{0,3}\.\d{0,3}\.\d{0,3})\.\d{0,3}</Version>'
$archiveName = "bin\Libation."+$verMatch.Matches.Groups[1].Value+".zip"
Compress-Archive -Path $pubDir -DestinationPath $archiveName -Force