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>release/v1.15
parent
bcb52aef09
commit
391e0638cc
6
Makefile
6
Makefile
|
@ -5,9 +5,13 @@ export GO111MODULE=off
|
||||||
GO ?= go
|
GO ?= go
|
||||||
SED_INPLACE := sed -i
|
SED_INPLACE := sed -i
|
||||||
SHASUM ?= shasum -a 256
|
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)
|
export PATH := $(GOPATH)/bin:$(PATH)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(OS), Windows_NT)
|
ifeq ($(OS), Windows_NT)
|
||||||
EXECUTABLE ?= gitea.exe
|
EXECUTABLE ?= gitea.exe
|
||||||
|
|
Loading…
Reference in New Issue