-
Notifications
You must be signed in to change notification settings - Fork 3
/
post_build.ps1
25 lines (19 loc) · 927 Bytes
/
post_build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
param([string]$version="NO_VERSION")
$destination = ".\Releases\$version"
$pluginDestination = "C:\Users\user\AppData\Roaming\r2modmanPlus-local\RiskOfRain2\profiles\Modding\BepInEx\plugins\$version"
if(Test-Path $destination)
{
Remove-Item $destination -Recurse
}
if(Test-Path $pluginDestination)
{
Remove-Item $pluginDestination -Recurse
}
New-Item -Path $destination -ItemType Directory
Copy-Item -Path ".\MiniMapMod\obj\Release\netstandard2.1\MiniMapMod.dll" -Destination $destination
Copy-Item -Path ".\MiniMapLibrary\obj\Release\netstandard2.1\MiniMapLibrary.dll" -Destination $destination
Copy-Item -Path ".\README.md" -Destination $destination
Copy-Item -Path ".\icon.png" -Destination $destination
Copy-Item -Path ".\manifest.json" -Destination $destination
Copy-Item -Path $destination $pluginDestination -Recurse
Compress-Archive -Path "$destination\*.*" -DestinationPath "$destination\$version.zip"