Browse Source
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>
for-closed-social
zeripath
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
2 deletions
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" )
i f e q ( $( HAS_GO ) , G O )
GOPATH ?= $( shell $( GO) env GOPATH)
export PATH := $( GOPATH) /bin:$( PATH)
e n d i f
export PATH := $( GOPATH) /bin:$( PATH)
i f e q ( $( OS ) , W i n d o w s _ N T )
i f e q ( $( OS ) , W i n d o w s _ N T )
EXECUTABLE ?= gitea.exe
EXECUTABLE ?= gitea.exe