-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
Copy pathbuild.ps1
44 lines (32 loc) · 1.1 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
.\clean.ps1
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
Get-ChildItem -Path '.' -Directory | ForEach-Object {
$name=$_.Name
if ( Test-Path ".\$name\build.ps1" ) {
Write-Host "Building $name"
& ".\$name\build.ps1"
if ( -Not $? ) {
Write-Host "Build $name failed"
exit $lastExitCode
}
}
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
}
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
Get-ChildItem -Path '.' -Directory | ForEach-Object {
$name=$_.Name
if ( Test-Path ".\$name\src" ) {
rm -Recurse -Force ".\$name\src"
}
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
}
Write-Host
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
Get-ChildItem -Path '.\release' -File | ForEach-Object {
$name=$_.Name
$hash=(Get-FileHash ".\release\$name" -Algorithm SHA256).Hash.ToLower()
Write-Host "$hash $name"
}
Pop-Location
exit 0