diff --git a/build/common.ps1 b/build/common.ps1 index 61d9cf03d2..85f18edb21 100644 --- a/build/common.ps1 +++ b/build/common.ps1 @@ -36,7 +36,8 @@ if ($full -eq "-f") "../templates/console", "../templates/wpf", "../templates/app-nolayers/aspnet-core", - "../abp_io/AbpIoLocalization" + "../abp_io/AbpIoLocalization", + "../source-code" ) }else{ Write-host "" diff --git a/delete-bin-obj.ps1 b/delete-bin-obj.ps1 new file mode 100644 index 0000000000..e26ba4fdce --- /dev/null +++ b/delete-bin-obj.ps1 @@ -0,0 +1,15 @@ +Clear-Host + +Write-Host "Deleting all BIN and OBJ folders..." -ForegroundColor Cyan + +Get-ChildItem -Path . -Include bin,obj -Recurse -Directory | ForEach-Object { + if ($_.FullName -notmatch "\\node_modules\\") { + Write-Host "Deleting:" $_.FullName -ForegroundColor Yellow + Remove-Item $_.FullName -Recurse -Force + } else { + Write-Host "Skipping:" $_.FullName -ForegroundColor Magenta + } +} + +Write-Host "BIN and OBJ folders have been successfully deleted." -ForegroundColor Green + diff --git a/nupkg/pack.ps1 b/nupkg/pack.ps1 index 0835ed790c..316f7d777f 100644 --- a/nupkg/pack.ps1 +++ b/nupkg/pack.ps1 @@ -1,4 +1,6 @@ . ".\common.ps1" +# Delete existing nupkg files +del *.nupkg # Rebuild all solutions foreach($solution in $solutions) { @@ -7,9 +9,6 @@ foreach($solution in $solutions) { dotnet restore } -# Delete old packages -del *.nupkg - # Create all packages $i = 0 $projectsCount = $projects.length @@ -23,8 +22,10 @@ foreach($project in $projects) { # Create nuget pack Write-Info "[$i / $projectsCount] - Packing project: $projectName" Set-Location $projectFolder -# dotnet clean - dotnet pack -c Release -- /maxcpucount + + #dotnet clean + dotnet pack -c Release --no-build + if (-Not $?) { Write-Error "Packaging failed for the project: $projectName"