]> O.S.I.I.S - jp/crow.git/commitdiff
update appveyor config
authorJP Bruyère <jp_bruyere@hotmail.com>
Sun, 24 Jul 2016 08:21:53 +0000 (10:21 +0200)
committerJP Bruyère <jp_bruyere@hotmail.com>
Sun, 24 Jul 2016 08:21:53 +0000 (10:21 +0200)
appveyor.yml
frameworks.ps [new file with mode: 0644]

index cf584100d1cc95a40d07df43d757abf0adf6d898..df2186a3b736647c948b827cb22ff3db382e3bf2 100644 (file)
@@ -1,64 +1,15 @@
 version: 0.4.{build}
 
 branches:
-
   only:
-
   - master
 
 clone_depth: 1
 
 before_build:
 - cmd: nuget restore
-- ps: |
-function Get-KeyPropertyValue($key, $property)
-{
-    if($key.Property -contains $property)
-    {
-        Get-ItemProperty $key.PSPath -name $property | select -expand $property
-    }
-}
-function Get-VersionName($key)
-{
-   $name = Get-KeyPropertyValue $key Version
-   $sp = Get-KeyPropertyValue $key SP
-   $install = Get-KeyPropertyValue $key Install
-   if($sp)
-   {
-        "$($_.PSChildName) $name SP $sp"
-    }else{
-    "$($_.PSChildName) $name"
-    }
-}
-function Get-FrameworkVersion{
-   dir "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\" |? {$_.PSChildName -like "v*"} |%{
-    if( $_.Property -contains "Version")
-    {
-        Get-VersionName $_
-    }else{
-        $parent = $_
-        Get-ChildItem $_.PSPath |%{
-            $versionName = Get-VersionName $_
-            "$($parent.PSChildName) $versionName"
+- ps: frameworks.ps
 
-        }
-    }    
-}
-$v4Directory = "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
-if(Test-Path $v4Directory)
-{
-    $v4 = Get-Item $v4Directory
-    $version = Get-KeyPropertyValue $v4 Release
-    switch($version){
-        378389 {".NET Framework 4.5"; break;}
-        378675 {".NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2"; break;}
-        378758 {".NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2"; break;}
-        379893 {".NET Framework 4.5.2"; break;}
-        { 393295, 393297 -contains $_} {".NET Framework 4.6"; break;}
-        { 394254, 394271 -contains $_} {".NET Framework 4.6.1"; break;}        
-    }
-}
-}
 build:
 
   project: Crow.sln
diff --git a/frameworks.ps b/frameworks.ps
new file mode 100644 (file)
index 0000000..e9a634c
--- /dev/null
@@ -0,0 +1,48 @@
+function Get-KeyPropertyValue($key, $property)
+{
+    if($key.Property -contains $property)
+    {
+        Get-ItemProperty $key.PSPath -name $property | select -expand $property
+    }
+}
+function Get-VersionName($key)
+{
+   $name = Get-KeyPropertyValue $key Version
+   $sp = Get-KeyPropertyValue $key SP
+   $install = Get-KeyPropertyValue $key Install
+   if($sp)
+   {
+        "$($_.PSChildName) $name SP $sp"
+    }else{
+    "$($_.PSChildName) $name"
+    }
+}
+function Get-FrameworkVersion{
+   dir "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\" |? {$_.PSChildName -like "v*"} |%{
+    if( $_.Property -contains "Version")
+    {
+        Get-VersionName $_
+    }else{
+        $parent = $_
+        Get-ChildItem $_.PSPath |%{
+            $versionName = Get-VersionName $_
+            "$($parent.PSChildName) $versionName"
+
+        }
+    }    
+}
+$v4Directory = "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
+if(Test-Path $v4Directory)
+{
+    $v4 = Get-Item $v4Directory
+    $version = Get-KeyPropertyValue $v4 Release
+    switch($version){
+        378389 {".NET Framework 4.5"; break;}
+        378675 {".NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2"; break;}
+        378758 {".NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2"; break;}
+        379893 {".NET Framework 4.5.2"; break;}
+        { 393295, 393297 -contains $_} {".NET Framework 4.6"; break;}
+        { 394254, 394271 -contains $_} {".NET Framework 4.6.1"; break;}        
+    }
+}
+}
\ No newline at end of file