File: create-go-workspace.yml

package info (click to toggle)
golang-github-azure-azure-sdk-for-go 68.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 556,256 kB
  • sloc: javascript: 196; sh: 96; makefile: 7
file content (18 lines) | stat: -rw-r--r-- 908 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
steps:
  # steps after this one (and in the same job) will have access to the variable
  # GO_WORKSPACE_PATH
  # GO_PATH
  # all further steps should utilize these values through $(GO_PATH) or $(GO_WORKSPACE_PATH)
  - pwsh: |
      $target = "$(Build.SourcesDirectory)/../go"
      $createdWorkspaceInfo = (./eng/scripts/create_go_workspace.ps1 -goWorkSpaceDir $target)

      # set the output variables for further jobs. 
      Write-Host "##vso[task.setvariable variable=GOPATH]$($createdWorkspaceInfo.GO_PATH)"
      Write-Host "##vso[task.setvariable variable=GO_WORKSPACE_PATH]$($createdWorkspaceInfo.GO_WORKSPACE_PATH)"

      Write-Host "Prepending Path with $($createdWorkspaceInfo.GO_PATH)/bin"

      # also prepend the path permanently to ensure access the newly installed tools
      Write-Host "##vso[task.prependpath]$($createdWorkspaceInfo.GO_PATH)/bin"
    displayName: "Create Go Workspace"