Browse Source

Merge pull request #16183 from abpframework/shorten-release-time

Shorten release time
pull/16184/head
Alper Ebiçoğlu 3 years ago
committed by GitHub
parent
commit
ea68dc4552
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      build/common.ps1
  2. 15
      delete-bin-obj.ps1
  3. 11
      nupkg/pack.ps1

3
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 ""

15
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

11
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"

Loading…
Cancel
Save