Skip to content

Commit e1f8de4

Browse files
committed
Avoid build errors if build couldnt be deleted or dist already existed
1 parent d3c4bfc commit e1f8de4

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

build.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
cargo build --release
22
if (Test-Path ./build) {
3-
Remove-Item -Path ./build -Recurse
3+
Remove-Item -Path ./build/* -Recurse
4+
} else {
5+
New-Item -Path ./build -ItemType directory > $null
6+
}
7+
if (Test-Path ./dist) {
8+
Remove-Item -Path ./dist/* -Recurse
9+
} else {
10+
New-Item -Path ./dist -ItemType directory > $null
411
}
5-
New-Item -Path ./build -ItemType directory > $null
6-
New-Item -Path ./dist -ItemType directory > $null
712
Copy-Item -Path ./target/release/tabletdrivercleanup.exe -Destination ./build
813
Copy-Item -Path ./eng/dump.bat -Destination ./build
914
Copy-Item -Path ./eng/dry_run.bat -Destination ./build

0 commit comments

Comments
 (0)