From 5726c6ee2e3fa65f6baf175f3e81adb5e8ffb0d9 Mon Sep 17 00:00:00 2001 From: Connection Refused Date: Mon, 27 Sep 2021 19:42:43 +0800 Subject: [PATCH] [Other] Update build.ps1 --- Other/build.ps1 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Other/build.ps1 b/Other/build.ps1 index 47390f65..3c949533 100644 --- a/Other/build.ps1 +++ b/Other/build.ps1 @@ -2,9 +2,8 @@ Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) .\clean.ps1 +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) Get-ChildItem -Path '.' -Directory | ForEach-Object { - Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) - $name=$_.Name if ( Test-Path ".\$name\build.ps1" ) { @@ -16,20 +15,24 @@ Get-ChildItem -Path '.' -Directory | ForEach-Object { exit $lastExitCode } } + + Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) } +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) Get-ChildItem -Path '.' -Directory | ForEach-Object { - Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) - $name=$_.Name if ( Test-Path ".\$name\src" ) { rm -Recurse -Force ".\$name\src" } + + Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) } Write-Host +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) Get-ChildItem -Path '.\release' -File | ForEach-Object { $name=$_.Name $hash=(Get-FileHash ".\release\$name" -Algorithm SHA256).Hash.ToLower()