From fdc72e67f09e8bd33155c5764610f7cb25f8609e Mon Sep 17 00:00:00 2001 From: Netch Date: Sat, 10 Jul 2021 14:30:10 +0800 Subject: [PATCH] fix: build --- .gitignore | 1 + Other/build.ps1 | 6 +++++- Other/clean.ps1 | 6 +++++- Other/deps.ps1 | 6 +++++- build.ps1 | 2 ++ 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e0e7e21c..a54dcc64 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.vs /.idea +/release /packages /TestResults diff --git a/Other/build.ps1 b/Other/build.ps1 index 494a7d74..c1a269c5 100644 --- a/Other/build.ps1 +++ b/Other/build.ps1 @@ -1,4 +1,7 @@ -Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +$exec=(Split-Path $MyInvocation.MyCommand.Path -Parent) +$last=(Get-Location).Path + +Set-Location $exec .\clean.ps1 @@ -14,4 +17,5 @@ Get-ChildItem -Path . -Directory | ForEach-Object { } } +Set-Location $last exit 0 diff --git a/Other/clean.ps1 b/Other/clean.ps1 index 7e41210a..f5b0271d 100644 --- a/Other/clean.ps1 +++ b/Other/clean.ps1 @@ -1,7 +1,11 @@ -Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +$exec=(Split-Path $MyInvocation.MyCommand.Path -Parent) +$last=(Get-Location).Path + +Set-Location $exec if (Test-Path release) { Remove-Item -Recurse -Force release } +Set-Location $last exit 0 diff --git a/Other/deps.ps1 b/Other/deps.ps1 index 6421a8a8..da61ab8b 100644 --- a/Other/deps.ps1 +++ b/Other/deps.ps1 @@ -1,4 +1,7 @@ -Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +$exec=(Split-Path $MyInvocation.MyCommand.Path -Parent) +$last=(Get-Location).Path + +Set-Location $exec .\clean.ps1 @@ -11,4 +14,5 @@ Get-ChildItem -Path . -Directory | ForEach-Object { } } +Set-Location $last exit 0 diff --git a/build.ps1 b/build.ps1 index e888324a..fcf8180e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -22,6 +22,8 @@ param ( $PublishSingleFile = $True ) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) + .\Other\build.ps1 if ( -Not $? ) { exit $lastExitCode }