mirror of https://github.com/portainer/portainer
Merge branch 'develop' into webpack
commit
76ff555c1e
|
@ -6,19 +6,19 @@ param (
|
|||
$ErrorActionPreference = "Stop";
|
||||
|
||||
$binary = "portainer.exe"
|
||||
$project_path = (Get-ITEM -Path env:BUILD_SOURCESDIRECTORY).Value
|
||||
$go_path = "$($(Get-ITEM -Path env:AGENT_HOMEDIRECTORY).Value)\go"
|
||||
|
||||
Set-Item env:GOPATH "$project_path\api"
|
||||
Set-Item env:GOPATH "$go_path"
|
||||
|
||||
New-Item -Name dist -Path "$project_path" -ItemType Directory -Force | Out-Null
|
||||
New-Item -Name portainer -Path "$project_path\api\src\github.com\" -ItemType Directory | Out-Null
|
||||
New-Item -Name dist -Path "." -ItemType Directory | Out-Null
|
||||
New-Item -Name portainer -Path "$go_path\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
|
||||
Copy-Item -Path "api" -Destination "$go_path\src\github.com\portainer" -Recurse -Force -ErrorAction:SilentlyContinue
|
||||
Rename-Item -Path "$go_path\src\github.com\portainer\api" -NewName "portainer" -ErrorAction:SilentlyContinue
|
||||
|
||||
Set-Location -Path "$project_path\api\cmd\portainer"
|
||||
Set-Location -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"
|
||||
Move-Item -Path "$($binary)" -Destination "dist"
|
||||
|
|
Loading…
Reference in New Issue