# This is only for amd64
{{ if .Values.arch }}
  {{ if eq .Values.arch "amd64" }}
requires:
- name: "toolchain"
  category: "development"
  version: ">=0"
prelude:
- mkdir go/src/github.com/${GITHUB_ORG}/ -p
- cd go/src/github.com/${GITHUB_ORG}/ && git clone https://github.com/${GITHUB_ORG}/{{ .Values.name }}.git
env:
- GOPATH=/luetbuild/go/
- GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }}
- CGO_ENABLED=0
steps:
- PACKAGE_VERSION=${PACKAGE_VERSION%\-*} && cd go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/ && git checkout v"${PACKAGE_VERSION}" -b build && make build && mv build/* /usr/bin/
includes:
- usr/bin/.*|usr/bin
  {{ end }}
{{ end }}
