File tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change 1
- $Branch = " net5-develop"
2
1
$Version = " 2020.9.0"
3
2
$IsPreview = $true
4
3
5
- $Uri = " https://github.com/BornToBeRoot/NETworkManager/archive/ $Branch .zip "
4
+ $BuildPath = " $PSScriptRoot \Build "
6
5
7
- $ScriptPath = $MyInvocation.MyCommand.Path
8
- $ScriptDir = Split-Path $ScriptPath
9
-
10
- $TempFolder = " $ScriptDir \Temp"
11
- $DownloadedFile = " $TempFolder \download.zip"
12
- $BuildPath = " $ScriptDir \Build"
13
-
14
- # Download from Github
15
- New-Item - ItemType Directory - Path $TempFolder
16
- Invoke-WebRequest - Uri $Uri - UseBasicParsing - OutFile $DownloadedFile - ErrorAction Stop
17
-
18
- # Expand archive
19
- Expand-Archive - Path $DownloadedFile - DestinationPath $TempFolder
6
+ if (Test-Path - Path $BuildPath )
7
+ {
8
+ Remove-Item $BuildPath - Recurse
9
+ }
20
10
21
11
# Dotnet restore and build
22
- dotnet restore " $TempFolder \NETworkManager- $Branch \Source\NETworkManager.sln"
23
- dotnet build -- configuration Release " $TempFolder \NETworkManager- $Branch \Source\NETworkManager.sln"
12
+ dotnet restore " $PSScriptRoot \Source\NETworkManager.sln"
13
+ dotnet build -- configuration Release " $PSScriptRoot \Source\NETworkManager.sln"
24
14
25
15
# Copy files
26
- Copy-Item - Recurse - Path " $TempFolder \NETworkManager-$Branch \Source\NETworkManager\bin\Release\net5.0-windows" - Destination " $BuildPath \NETworkManager"
27
-
28
- Remove-Item - Recurse - Path $TempFolder
16
+ Copy-Item - Recurse - Path " $PSScriptRoot \Source\NETworkManager\bin\Release\net5.0-windows" - Destination " $BuildPath \NETworkManager"
29
17
30
18
# Is preview?
31
19
if ($IsPreview )
You can’t perform that action at this time.
0 commit comments