-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBuild.ps1
27 lines (24 loc) · 1.03 KB
/
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
25
26
27
if (!(Get-Module XpandPwsh -ListAvailable)){
Install-Module XpandPwsh -RequiredVersion 0.17.3 -Scope CurrentUser -AllowClobber -Force
}
Get-ChildItem *.sln -Recurse|ForEach-Object{
dotnet build $_.FullName --configuration Release
if ($LASTEXITCODE){
throw
}
}
Get-ChildItem *.nupkg -Recurse|ForEach-Object{
$tempFolder="$env:TEMP\$($_.BaseName)"
New-Item $tempFolder -ItemType Directory -Force
$zipName="$($_.BaseName).zip"
Copy-Item $_.FullName "$tempFolder\$zipName" -Force
Expand-Archive "$tempFolder\$zipName" $tempFolder -Force
Remove-Item "$tempFolder\$zipName"
$sha=Get-GitLastSha "https://github.com/eXpandFramework/Fasterflect" master
"sha=$sha"
Get-ChildItem $tempFolder *.pdb -Recurse|ForEach-Object{
Update-Symbols -pdb $_.FullName -TargetRoot "https://raw.githubusercontent.com/eXpandFramework/Fasterflect/$sha/" -SourcesRoot $PSScriptRoot
}
Compress-Archive "$tempFolder\*" "$tempFolder\$zipName"
Copy-Item "$tempfolder\$zipName" $_.FullName -Force
}