Skip to content

Commit

Permalink
Fix local function issue for variables.env (#47)
Browse files Browse the repository at this point in the history
* Fix local issue for variables.env

Signed-off-by: Kemal Akkoyun <[email protected]>

* Address review issues

Signed-off-by: Kemal Akkoyun <[email protected]>
  • Loading branch information
kakkoyun authored Nov 3, 2020
1 parent 223fa25 commit 410828c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions .bingo/variables.env
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.2.2. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
local gobin=$(go env GOBIN)
GOBIN=${GOBIN:=$(go env GOBIN)}

if [ -z "$gobin" ]; then
gobin="$(go env GOPATH)/bin"
if [ -z "$GOBIN" ]; then
GOBIN="$(go env GOPATH)/bin"
fi


COPYRIGHT="${gobin}/copyright-v0.9.0"
COPYRIGHT="${GOBIN}/copyright-v0.9.0"

EMBEDMD="${gobin}/embedmd-v1.0.0"
EMBEDMD="${GOBIN}/embedmd-v1.0.0"

FAILLINT="${gobin}/faillint-v1.5.0"
FAILLINT="${GOBIN}/faillint-v1.5.0"

GOIMPORTS="${gobin}/goimports-v0.0.0-20200519204825-e64124511800"
GOIMPORTS="${GOBIN}/goimports-v0.0.0-20200519204825-e64124511800"

GOLANGCI_LINT="${gobin}/golangci-lint-v1.26.0"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.26.0"

MISSPELL="${gobin}/misspell-v0.3.4"
MISSPELL="${GOBIN}/misspell-v0.3.4"

8 changes: 4 additions & 4 deletions pkg/bingo/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ const (
envBinVarsTmpl = `# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo {{ .Version }}. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
local gobin=$(go env GOBIN)
GOBIN=${GOBIN:=$(go env GOBIN)}
if [ -z "$gobin" ]; then
gobin="$(go env GOPATH)/bin"
if [ -z "$GOBIN" ]; then
GOBIN="$(go env GOPATH)/bin"
fi
{{range $p := .MainPackages }}
{{ $p.EnvVarName }}="{{- range $i, $v := $p.Versions }}{{- if ne $i 0}} {{- end }}${gobin}/{{ $p.Name }}-{{ $v.Version }}{{- end }}"
{{ $p.EnvVarName }}="{{- range $i, $v := $p.Versions }}{{- if ne $i 0}} {{- end }}${GOBIN}/{{ $p.Name }}-{{ $v.Version }}{{- end }}"
{{ end}}
`
)

0 comments on commit 410828c

Please sign in to comment.