Selaa lähdekoodia

Check if go exists before generating the GOPATH (#10100)

* Check if go exists before generating the GOPATH

* Move export PATH into Go protected section

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
tags/v1.10.5
zeripath 4 vuotta sitten
vanhempi
commit
391e0638cc
No account linked to committer's email address
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6
    2
      Makefile

+ 6
- 2
Makefile Näytä tiedosto

@@ -5,9 +5,13 @@ export GO111MODULE=off
GO ?= go
SED_INPLACE := sed -i
SHASUM ?= shasum -a 256
GOPATH ?= $(shell $(GO) env GOPATH)
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )

ifeq ($(HAS_GO), GO)
GOPATH ?= $(shell $(GO) env GOPATH)
export PATH := $(GOPATH)/bin:$(PATH)
endif

export PATH := $(GOPATH)/bin:$(PATH)

ifeq ($(OS), Windows_NT)
EXECUTABLE ?= gitea.exe

Loading…
Peruuta
Tallenna