mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 01:27:38 +00:00
Build multiple targets (#2450)
This commit is contained in:
parent
ec49dc786e
commit
684206c255
35
wmake.ps1
35
wmake.ps1
@ -19,11 +19,36 @@ Param(
|
|||||||
[Parameter(Position=0,
|
[Parameter(Position=0,
|
||||||
HelpMessage="Enter the build target")]
|
HelpMessage="Enter the build target")]
|
||||||
[Alias("target")]
|
[Alias("target")]
|
||||||
[AllowEmptyString()]
|
|
||||||
[ValidateSet("all", "clean", "test", "erigon","rpcdaemon","rpctest", "hack", "state", "integration", "db-tools", "sentry")]
|
[ValidateSet("all", "clean", "test", "erigon","rpcdaemon","rpctest", "hack", "state", "integration", "db-tools", "sentry")]
|
||||||
[string]$BuildTarget="erigon"
|
[string[]]$BuildTargets=@("erigon","rpcdaemon","sentry","integration")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Sanity checks on $BuildTargets
|
||||||
|
if ($BuildTargets.Count -gt 1) {
|
||||||
|
|
||||||
|
# "all" target must be alone
|
||||||
|
if ($BuildTargets.Contains("all")) {
|
||||||
|
Write-Host @"
|
||||||
|
|
||||||
|
Error ! Target "all" must be set alone.
|
||||||
|
|
||||||
|
"@
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# "clean" target must be alone
|
||||||
|
if ($BuildTargets.Contains("clean")) {
|
||||||
|
Write-Host @"
|
||||||
|
|
||||||
|
Error ! Target "clean" must be set alone.
|
||||||
|
|
||||||
|
"@
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
# Messages texts
|
# Messages texts
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
@ -31,7 +56,7 @@ Param(
|
|||||||
$headerText = @"
|
$headerText = @"
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
Erigon's wmake.ps1 : Selected target $($BuildTarget)
|
Erigon's wmake.ps1 : Selected target(s) $($BuildTargets -join " ")
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
"@
|
"@
|
||||||
@ -334,6 +359,7 @@ if (!($?)) {
|
|||||||
# return
|
# return
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
|
||||||
# Build erigon binaries
|
# Build erigon binaries
|
||||||
Set-Variable -Name "Erigon" -Value ([hashtable]::Synchronized(@{})) -Scope Script
|
Set-Variable -Name "Erigon" -Value ([hashtable]::Synchronized(@{})) -Scope Script
|
||||||
$Erigon.Commit = [string]@(git.exe rev-list -1 HEAD)
|
$Erigon.Commit = [string]@(git.exe rev-list -1 HEAD)
|
||||||
@ -362,6 +388,7 @@ Write-Host @"
|
|||||||
|
|
||||||
"@
|
"@
|
||||||
|
|
||||||
|
foreach($BuildTarget in $BuildTargets) {
|
||||||
## Choco components for building db-tools
|
## Choco components for building db-tools
|
||||||
if ($BuildTarget -eq "all" -or $BuildTarget -eq "db-tools") {
|
if ($BuildTarget -eq "all" -or $BuildTarget -eq "db-tools") {
|
||||||
if(!(Test-choco-Installed)) {
|
if(!(Test-choco-Installed)) {
|
||||||
@ -526,6 +553,6 @@ if ($BuildTarget -eq "clean") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
# Return to source folder
|
# Return to source folder
|
||||||
Set-Location $MyContext.Directory
|
Set-Location $MyContext.Directory
|
||||||
|
Loading…
Reference in New Issue
Block a user