-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathappveyor.ps1
More file actions
64 lines (54 loc) · 2.51 KB
/
appveyor.ps1
File metadata and controls
64 lines (54 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[string[]]$repos = 'https://github.com/StackExchange/dapper-dot-net',
'https://github.com/xunit/xunit',
'https://github.com/nunit/nunit',
'https://github.com/moq/moq4',
'https://github.com/antlr/antlrcs',
'https://github.com/MvvmCross/MvvmCross',
'https://github.com/JamesNK/Newtonsoft.Json',
'https://github.com/aspnet/entityframework',
'https://github.com/aspnet/Routing',
'https://github.com/aspnet/Microsoft.Data.Sqlite',
'https://github.com/aspnet/Razor',
'https://github.com/aspnet/Caching',
'https://github.com/aspnet/Common',
'https://github.com/Azure/azure-storage-net',
'https://github.com/Azure/azure-powershell',
'https://github.com/Azure/azure-sdk-for-net',
'https://github.com/Azure/azure-webjobs-sdk-script',
'https://github.com/Azure/azure-webjobs-sdk',
'https://github.com/Azure/azure-iot-remote-monitoring'
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
$scriptDir = ((Get-ScriptDirectory) + "\")
$helperpath = (Join-Path $scriptDir 'helper.ps1')
if(-not (Test-Path $helperpath -PathType Leaf)){
throw ('file not found at {0}' -f $helperpath)
}
# inline the script
. $helperpath
$tempDir = (Join-Path ([System.IO.Path]::GetTempPath()) ('xcompile\{0}' -f ([datetime]::Now.Ticks)))
New-Item -Path $tempDir -ItemType Directory
foreach($r in $repos){
"Processing [$r]" | Write-Host -ForegroundColor Cyan
$repoDir = (CloneRepo -url $r)
[System.IO.DirectoryInfo]$dirInfo = $repoDir
[System.Uri]$ruri = $r
$projname = $ruri.Segments[$ruri.Segments.Count -1]
$reportPath = (Join-Path $tempDir ('{0}.txt' -f $projname))
Get-Ifdef -path $repoDir | Out-File $reportPath
if(Test-Path $reportPath){
Push-AppveyorArtifact $reportPath
}
}
'Creating zip file with all results' | Write-Host -ForegroundColor Cyan
# create zip file
$zipfile = (Join-Path $tempDir all.zip)
if(Test-Path -Path $zipfile){
Remove-Item $zipfile
}
New-ZipFile -ZipFilePath $zipfile -rootFolder $tempDir -InputObject ((Get-ChildItem -Path $tempDir *.txt -Recurse -File).FullName)
Push-AppveyorArtifact $zipfile
'Completed - see artifacts to download results' | Write-Host