From 583c57a02cfe9405de511939f3b41fc5ae75ce39 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 23 Jan 2020 15:07:12 +0300 Subject: [PATCH] build scripts moved and refactored --- build-all-release.ps1 | 40 ------------------------------------- build-all.ps1 | 40 ------------------------------------- build/build-all-release.ps1 | 16 +++++++++++++++ build/build-all.ps1 | 16 +++++++++++++++ build/common.ps1 | 25 +++++++++++++++++++++++ build/test-all.ps1 | 16 +++++++++++++++ test-all.ps1 | 39 ------------------------------------ 7 files changed, 73 insertions(+), 119 deletions(-) delete mode 100644 build-all-release.ps1 delete mode 100644 build-all.ps1 create mode 100644 build/build-all-release.ps1 create mode 100644 build/build-all.ps1 create mode 100644 build/common.ps1 create mode 100644 build/test-all.ps1 delete mode 100644 test-all.ps1 diff --git a/build-all-release.ps1 b/build-all-release.ps1 deleted file mode 100644 index e6555f8d6b..0000000000 --- a/build-all-release.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -# COMMON PATHS - -$rootFolder = (Get-Item -Path "./" -Verbose).FullName - -# List of solutions - -$solutionPaths = ( - "framework", - "modules/users", - "modules/permission-management", - "modules/setting-management", - "modules/feature-management", - "modules/identity", - "modules/identityserver", - "modules/tenant-management", - "modules/account", - "modules/docs", - "modules/blogging", - "modules/audit-logging", - "modules/background-jobs", - "modules/client-simulation", - "templates/module/aspnet-core", - "templates/app/aspnet-core", - "abp_io/AbpIoLocalization" -) - -# Build all solutions - -foreach ($solutionPath in $solutionPaths) { - $solutionAbsPath = (Join-Path $rootFolder $solutionPath) - Set-Location $solutionAbsPath - dotnet build --configuration Release - if (-Not $?) { - Write-Host ("Build failed for the solution: " + $solutionPath) - Set-Location $rootFolder - exit $LASTEXITCODE - } -} - -Set-Location $rootFolder diff --git a/build-all.ps1 b/build-all.ps1 deleted file mode 100644 index 649abc5f8c..0000000000 --- a/build-all.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -# COMMON PATHS - -$rootFolder = (Get-Item -Path "./" -Verbose).FullName - -# List of solutions - -$solutionPaths = ( - "framework", - "modules/users", - "modules/permission-management", - "modules/setting-management", - "modules/feature-management", - "modules/identity", - "modules/identityserver", - "modules/tenant-management", - "modules/account", - "modules/docs", - "modules/blogging", - "modules/audit-logging", - "modules/background-jobs", - "modules/client-simulation", - "templates/module/aspnet-core", - "templates/app/aspnet-core", - "abp_io/AbpIoLocalization" -) - -# Build all solutions - -foreach ($solutionPath in $solutionPaths) { - $solutionAbsPath = (Join-Path $rootFolder $solutionPath) - Set-Location $solutionAbsPath - dotnet build - if (-Not $?) { - Write-Host ("Build failed for the solution: " + $solutionPath) - Set-Location $rootFolder - exit $LASTEXITCODE - } -} - -Set-Location $rootFolder diff --git a/build/build-all-release.ps1 b/build/build-all-release.ps1 new file mode 100644 index 0000000000..1c86351379 --- /dev/null +++ b/build/build-all-release.ps1 @@ -0,0 +1,16 @@ +. ".\common.ps1" + +# Build all solutions + +foreach ($solutionPath in $solutionPaths) { + $solutionAbsPath = (Join-Path $rootFolder $solutionPath) + Set-Location $solutionAbsPath + dotnet build --configuration Release + if (-Not $?) { + Write-Host ("Build failed for the solution: " + $solutionPath) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} + +Set-Location $rootFolder diff --git a/build/build-all.ps1 b/build/build-all.ps1 new file mode 100644 index 0000000000..ffaffa67a3 --- /dev/null +++ b/build/build-all.ps1 @@ -0,0 +1,16 @@ +. ".\common.ps1" + +# Build all solutions + +foreach ($solutionPath in $solutionPaths) { + $solutionAbsPath = (Join-Path $rootFolder $solutionPath) + Set-Location $solutionAbsPath + dotnet build + if (-Not $?) { + Write-Host ("Build failed for the solution: " + $solutionPath) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} + +Set-Location $rootFolder diff --git a/build/common.ps1 b/build/common.ps1 new file mode 100644 index 0000000000..a1ce703565 --- /dev/null +++ b/build/common.ps1 @@ -0,0 +1,25 @@ +# COMMON PATHS + +$rootFolder = (Get-Item -Path "./" -Verbose).FullName + +# List of solutions + +$solutionPaths = ( + "../framework", + "../modules/users", + "../modules/permission-management", + "../modules/setting-management", + "../modules/feature-management", + "../modules/identity", + "../modules/identityserver", + "../modules/tenant-management", + "../modules/account", + "../modules/docs", + "../modules/blogging", + "../modules/audit-logging", + "../modules/background-jobs", + "../modules/client-simulation", + "../templates/module/aspnet-core", + "../templates/app/aspnet-core", + "../abp_io/AbpIoLocalization" +) \ No newline at end of file diff --git a/build/test-all.ps1 b/build/test-all.ps1 new file mode 100644 index 0000000000..1465bff6c3 --- /dev/null +++ b/build/test-all.ps1 @@ -0,0 +1,16 @@ +. ".\common.ps1" + +# Test all solutions + +foreach ($solutionPath in $solutionPaths) { + $solutionAbsPath = (Join-Path $rootFolder $solutionPath) + Set-Location $solutionAbsPath + dotnet test --no-build --no-restore + if (-Not $?) { + Write-Host ("Test failed for the solution: " + $solutionPath) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} + +Set-Location $rootFolder diff --git a/test-all.ps1 b/test-all.ps1 deleted file mode 100644 index 10ed0a9583..0000000000 --- a/test-all.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -# COMMON PATHS - -$rootFolder = (Get-Item -Path "./" -Verbose).FullName - -# List of solutions - -$solutionPaths = ( - "framework", - "modules/users", - "modules/permission-management", - "modules/setting-management", - "modules/feature-management", - "modules/identity", - "modules/identityserver", - "modules/tenant-management", - "modules/account", - "modules/docs", - "modules/blogging", - "modules/audit-logging", - "modules/background-jobs", - "modules/client-simulation", - "templates/module/aspnet-core", - "templates/app/aspnet-core" -) - -# Test all solutions - -foreach ($solutionPath in $solutionPaths) { - $solutionAbsPath = (Join-Path $rootFolder $solutionPath) - Set-Location $solutionAbsPath - dotnet test --no-build --no-restore - if (-Not $?) { - Write-Host ("Test failed for the solution: " + $solutionPath) - Set-Location $rootFolder - exit $LASTEXITCODE - } -} - -Set-Location $rootFolder