-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build & publish to local folder script
- Loading branch information
Showing
5 changed files
with
126 additions
and
8 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 |
---|---|---|
|
@@ -328,3 +328,8 @@ ASALocalRun/ | |
|
||
# MFractors (Xamarin productivity tool) working folder | ||
.mfractor/ | ||
|
||
# Build directories | ||
**/build | ||
|
||
|
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
3 changes: 0 additions & 3 deletions
3
MndpTray/MndpTray.Core/Properties/PublishProfiles/win-x64-full.pubxml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# | ||
# To enable script execution, run at admin powershell prompt | ||
# 'set-executionpolicy remotesigned' | ||
# | ||
|
||
$SolutionFolderPath=$PSScriptRoot | ||
$BuildFolderPath="$SolutionFolderPath\Build" | ||
|
||
echo "SolutionFolderPath: $SolutionFolderPath"; | ||
echo "BuildFolderPath: $BuildFolderPath"; | ||
|
||
|
||
# | ||
# Remove & Clean Output Folder | ||
# | ||
|
||
if (Test-Path -LiteralPath $BuildFolderPath) | ||
{ | ||
Remove-Item -LiteralPath $BuildFolderPath -Verbose -Recurse -WhatIf | ||
} | ||
md -Force $BuildFolderPath | ||
|
||
|
||
|
||
# | ||
# Publish Console | ||
# | ||
|
||
$ProjectsConsole = @( | ||
'MndpService.Core' | ||
) | ||
|
||
$ProfilesConsole = @( | ||
'win-x64' | ||
'win-x64-full' | ||
'linux-x64' | ||
'linux-x64-full' | ||
) | ||
|
||
|
||
foreach ( $Project in $ProjectsLinux ) | ||
{ | ||
echo "" | ||
echo "Project: [$Project]" | ||
echo "" | ||
dotnet clean -c Release $SolutionFolderPath\$Project | ||
dotnet build -c Release $SolutionFolderPath\$Project | ||
|
||
foreach ( $Profile in $ProfilesConsole ) | ||
{ | ||
echo "" | ||
echo "Profile: [$Profile]" | ||
echo "" | ||
|
||
dotnet publish -c Release $SolutionFolderPath\$Project /p:PublishProfile=$Profile | ||
} | ||
} | ||
|
||
|
||
# | ||
# Copy output | ||
# | ||
foreach ( $Project in $ProjectsConsole ) | ||
{ | ||
echo "" | ||
echo "Copy: [$Project]" | ||
echo "" | ||
|
||
Copy-Item -Verbose -Path $SolutionFolderPath\$Project\bin\Release\net8.0\publish\win-x64\$Project.exe -Destination $BuildFolderPath\$Project.exe | ||
Copy-Item -Verbose -Path $SolutionFolderPath\$Project\bin\Release\net8.0\publish\win-x64-full\$Project.exe -Destination $BuildFolderPath\$Project.Full.exe | ||
Copy-Item -Verbose -Path $SolutionFolderPath\$Project\bin\Release\net8.0\publish\linux-x64\$Project -Destination $BuildFolderPath\$Project | ||
Copy-Item -Verbose -Path $SolutionFolderPath\$Project\bin\Release\net8.0\publish\linux-x64-full\$Project -Destination $BuildFolderPath\$Project.Full | ||
} | ||
|
||
|
||
# | ||
# Publish Windows | ||
# | ||
|
||
$ProjectsWindows = @( | ||
'MndpTray.Core' | ||
) | ||
|
||
$ProfilesWindows = @( | ||
'win-x64' | ||
'win-x64-full' | ||
) | ||
|
||
|
||
foreach ( $Project in $ProjectsWindows ) | ||
{ | ||
echo "" | ||
echo "Project: [$Project]" | ||
echo "" | ||
dotnet clean -c Release $SolutionFolderPath\$Project | ||
dotnet build -c Release $SolutionFolderPath\$Project | ||
|
||
foreach ( $Profile in $ProfilesWindows ) | ||
{ | ||
echo "" | ||
echo "Profile: [$Profile]" | ||
echo "" | ||
|
||
dotnet publish -c Release $SolutionFolderPath\$Project /p:PublishProfile=$Profile | ||
} | ||
} | ||
|
||
# | ||
# Copy output | ||
# | ||
foreach ( $Project in $ProjectsWindows ) | ||
{ | ||
echo "" | ||
echo "Copy: [$Project]" | ||
echo "" | ||
|
||
Copy-Item -Verbose -Path $SolutionFolderPath\$Project\bin\Release\net8.0-windows\publish\win-x64\$Project.exe -Destination $BuildFolderPath\$Project.exe | ||
Copy-Item -Verbose -Path $SolutionFolderPath\$Project\bin\Release\net8.0-windows\publish\win-x64-full\$Project.exe -Destination $BuildFolderPath\$Project.Full.exe | ||
} |