1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(build-system): introduce Azure DevOps support (#2666)

This commit is contained in:
Steven Kang 2019-01-31 11:37:16 +13:00 committed by Anthony Lapenna
parent fca4f619b5
commit 576f369152
8 changed files with 127 additions and 120 deletions

24
build/build_binary_devops.ps1 Executable file
View file

@ -0,0 +1,24 @@
param (
[string]$platform,
[string]$arch
)
$ErrorActionPreference = "Stop";
$binary = "portainer.exe"
$project_path = (Get-ITEM -Path env:BUILD_SOURCESDIRECTORY).Value
Set-Item env:GOPATH "$project_path\api"
New-Item -Name dist -Path "$project_path" -ItemType Directory | Out-Null
New-Item -Name portainer -Path "$project_path\api\src\github.com\" -ItemType Directory | Out-Null
Copy-Item -Path "$project_path\api" -Destination "$project_path\api\src\github.com\portainer" -Recurse -Force -ErrorAction:SilentlyContinue
Rename-Item -Path "$project_path\api\src\github.com\portainer\api" -NewName "portainer" -ErrorAction:SilentlyContinue
Set-Location -Path "$project_path\api\cmd\portainer"
go.exe get -t -d -v ./...
go.exe build -v
Move-Item -Path "$project_path\api\cmd\portainer\$($binary)" -Destination "$project_path\dist"