mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
923 B
33 lines
923 B
. ".\common.ps1"
|
|
|
|
# Rebuild all solutions
|
|
foreach($solution in $solutions) {
|
|
$solutionFolder = Join-Path $rootFolder $solution
|
|
Set-Location $solutionFolder
|
|
& dotnet restore
|
|
}
|
|
|
|
# Create all packages
|
|
foreach($project in $projects) {
|
|
|
|
$projectFolder = Join-Path $rootFolder $project
|
|
|
|
# Create nuget pack
|
|
Set-Location $projectFolder
|
|
Remove-Item -Recurse (Join-Path $projectFolder "bin/Release")
|
|
& dotnet msbuild /t:pack /p:Configuration=Release /p:SourceLinkCreate=true
|
|
|
|
if (-Not $?) {
|
|
Write-Host ("Packaging failed for the project: " + $projectFolder)
|
|
exit $LASTEXITCODE
|
|
}
|
|
|
|
# Copy nuget package
|
|
$projectName = $project.Substring($project.LastIndexOf("/") + 1)
|
|
$projectPackPath = Join-Path $projectFolder ("/bin/Release/" + $projectName + ".*.nupkg")
|
|
Move-Item $projectPackPath $packFolder
|
|
|
|
}
|
|
|
|
# Go back to the pack folder
|
|
Set-Location $packFolder |