-
Notifications
You must be signed in to change notification settings - Fork 3
/
.build.ps1
24 lines (19 loc) · 956 Bytes
/
.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
Task 'Build' YamlDotNet, { }
Task 'YamlDotNet' {
if (Test-Path ./src/lib/YamlDotNet) {
Remove-Item -Path ./src/lib/YamlDotNet -Force -Recurse -ErrorAction Stop | Out-Null
}
if (Test-Path ./temp) {
Remove-Item -Path ./temp -Force -Recurse -ErrorAction Stop | Out-Null
}
$version = '6.1.2'
nuget install yamldotnet -source nuget.org -version $version -outputdirectory ./temp | Out-Null
New-Item -Path ./src/lib/YamlDotNet -ItemType Directory -Force | Out-Null
Copy-Item -Path "./temp/YamlDotNet.$($version)/lib/*" -Destination ./src/lib/YamlDotNet -Recurse -Force | Out-Null
if (Test-Path ./temp) {
Remove-Item -Path ./temp -Force -Recurse | Out-Null
}
Remove-Item -Path ./src/lib/YamlDotNet/net20 -Force -Recurse | Out-Null
Remove-Item -Path ./src/lib/YamlDotNet/net35 -Force -Recurse | Out-Null
Remove-Item -Path ./src/lib/YamlDotNet/net35-client -Force -Recurse | Out-Null
}