forked from junalmeida/dash-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pack.ps1
20 lines (15 loc) · 706 Bytes
/
pack.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Add-Type -Assembly "System.IO.Compression.FileSystem" ;
$PastaTfs="tfs-onpremise-ntlm\\bin\\Release\\"
$PastaClient="docs\\dist\\"
Copy-Item $PastaClient "$Env:Temp\\dash\\client" -Recurse
Copy-Item $PastaTfs "$Env:Temp\\dash\\tfs" -Recurse
$arquivo = "$Env:Temp\\dash\\tfs\\tfs-onpremise-ntlm.exe.config"
[xml]$xmlDoc = Get-Content $arquivo
$node = $xmlDoc.SelectSingleNode("//add[@key='static-files']")
$node.Attributes["value"].Value = "../client"
$xmlDoc.Save($arquivo);
if([System.IO.File]::Exists("release.zip")){
Remove-Item -Recurse -Force "release.zip"
}
[System.IO.Compression.ZipFile]::CreateFromDirectory("$Env:Temp\\dash", "release.zip")
Remove-Item -Recurse -Force "$Env:Temp\\dash"