Skip to content

Commit

Permalink
Improve release script
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Apr 26, 2020
1 parent 65d0f69 commit 1d22c59
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ $copy = $dir + "\copy\BepInEx"

New-Item -ItemType Directory -Force -Path ($dir + "\out")

Remove-Item -Force -Path ($copy) -Recurse -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Force -Path ($copy + "\plugins")

foreach ($element in $array)
{
try
{
Remove-Item -Force -Path ($dir + "\copy") -Recurse -ErrorAction SilentlyContinue
Remove-Item -Force -Path ($copy) -Recurse
New-Item -ItemType Directory -Force -Path ($copy + "\plugins")

Copy-Item -Path ($dir + "\BepInEx\plugins\" + $element + "_BepisPlugins") -Destination ($copy + "\plugins\" + $element + "_BepisPlugins") -Recurse -Force
Expand All @@ -27,7 +30,6 @@ foreach ($element in $array)
catch
{
# retry
Remove-Item -Force -Path ($dir + "\copy") -Recurse -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Force -Path ($copy + "\plugins")

Copy-Item -Path ($dir + "\BepInEx\plugins\" + $element + "_BepisPlugins") -Destination ($copy + "\plugins\" + $element + "_BepisPlugins") -Recurse -Force
Expand Down

0 comments on commit 1d22c59

Please sign in to comment.