-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
36 lines (28 loc) · 1.14 KB
/
build.ps1
File metadata and controls
36 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Build script for generating release package
Write-Output "Cleaning output folders..."
if (Test-Path -Path "output\")
{
Remove-Item output\* -Recurse -Force
}
# Clean both debug and release
dotnet clean src/Lite.EventIpc.slnx --configuration Release
dotnet build src/Lite.EventIpc.slnx --configuration Release
# Publish
Write-Output "Cleaning Publish folder.."
if (Test-Path -Path "publish\")
{
Remove-Item publish\* -Recurse -Force
}
else
{
New-Item -Path '.\publish' -ItemType Directory
}
Move-Item -Path "output/Lite.EventIpc/Release/Lite.EventIpc.1.0.0.nupkg" -Destination "publish/Lite.EventIpc.1.0.0.nupkg"
## Publish build artifacts
##dotnet publish src/Lite.EventIpc/Lite.EventIpc.csproj /p:PublishProfile=src/Lite.EventIpc/Properties/PublishProfiles/win-x64.pubxml /p:DebugType=None /p:DebugSymbols=false
##
#### Compress published artifacts
##Write-Output "Compressing published artifacts..."
##$dttm = (Get-Date).ToString("yyyy-MM-dd")
##$version = (Get-Item -Path "publish/win-x64/Lite.EventIpc.dll").VersionInfo.FileVersion
##Compress-Archive -Path "publish/win-x64/*" -DestinationPath "publish/Lite.EventIpc-${version}-(win-x64)_${dttm}.zip"