mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 23:39:41 +02:00
* refactor(api): refactor base import path * fix(build-system): update build_binary_devops * fix(build-system): fix build_binary_devops for linux * fix(build-system): fix build_binary_devops for Windows
23 lines
632 B
PowerShell
Executable file
23 lines
632 B
PowerShell
Executable file
param (
|
|
[string]$platform,
|
|
[string]$arch
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop";
|
|
|
|
$binary = "portainer.exe"
|
|
$go_path = "$($(Get-ITEM -Path env:AGENT_HOMEDIRECTORY).Value)\go"
|
|
|
|
Set-Item env:GOPATH "$go_path"
|
|
|
|
New-Item -Name dist -Path "." -ItemType Directory | Out-Null
|
|
New-Item -Name portainer -Path "$go_path\src\github.com\portainer" -ItemType Directory | Out-Null
|
|
|
|
Copy-Item -Path "api" -Destination "$go_path\src\github.com\portainer\portainer\api" -Recurse -Force -ErrorAction:SilentlyContinue
|
|
|
|
Set-Location -Path "api\cmd\portainer"
|
|
|
|
go.exe get -t -d -v ./...
|
|
go.exe build -v
|
|
|
|
Move-Item -Path "$($binary)" -Destination "dist"
|