-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-installer.ps1
More file actions
30 lines (25 loc) · 1 KB
/
Copy pathbuild-installer.ps1
File metadata and controls
30 lines (25 loc) · 1 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
# Wrapper for connector/installer/build.ps1 — builds ONEVO-Connector-Setup EXE.
param(
[Parameter(Mandatory = $true)]
[string]$BackendUrl,
[string]$PythonPath = "",
[string]$IsccPath = "",
[switch]$AllowHttp
)
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot
$buildScript = Join-Path $root "connector\installer\build.ps1"
if (-not (Test-Path $buildScript)) {
throw "Missing $buildScript"
}
Write-Host "Building ONEVO connector installer for $BackendUrl ..."
$buildArgs = @{ BackendUrl = $BackendUrl }
if ($PythonPath) { $buildArgs.PythonPath = $PythonPath }
if ($IsccPath) { $buildArgs.IsccPath = $IsccPath }
if ($AllowHttp) { $buildArgs.AllowHttp = $true }
& $buildScript @buildArgs
$dist = Join-Path $root "connector\dist"
Get-ChildItem $dist -Filter "ONEVO-Connector-Setup-*.exe" | ForEach-Object {
Write-Host "Built: $($_.FullName) ($([math]::Round($_.Length / 1MB, 1)) MB)"
}
Write-Host "Mount connector/dist into backend (docker-compose) or copy to ConnectorInstaller__Path."