forked from PredixDev/izon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathizon.ps1
More file actions
19 lines (16 loc) · 707 Bytes
/
Copy pathizon.ps1
File metadata and controls
19 lines (16 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function ConvertFromJson-Izon([object] $data) {
add-type -assembly system.web.extensions
$serializer=new-object system.web.script.serialization.javascriptSerializer
return New-Object PSObject -Property $serializer.DeserializeObject($data)
}
function ReadVersion-Izon() {
$data=[System.IO.File]::ReadAllText("$Env:TEMP\version.json")
return ConvertFromJson-Izon($data)
}
function ReadDependencies-Izon() {
$dependencies=ReadVersion-Izon | Select -ExpandProperty dependencies
return New-Object PSObject -Property $dependencies
}
function ReadDependency-Izon([object] $dependency) {
return ReadDependencies-Izon | Select -ExpandProperty $dependency | %{ $_ -split "#" }
}