aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Li <alimy@gility.net>2018-06-04 18:41:54 +0800
committer无闻 <u@gogs.io>2018-06-04 18:41:54 +0800
commitb152cbe45ae119eb21d4af42b3d34b117eda5753 (patch)
treef3fed8a85aefffb1c82fe98d91f22fd5b8dc8aac
parentc08aab90ec696b7fcc56b8da0a468e74d266b89e (diff)
Makefile: fix make build failure when environment of GOPATH have multiple items (#5262)
* fixed make build failure when enviroment of GOPATH have Multiple items gogs source in /other/path/to/go/src/github.com/gogs/gogs and then >cd /other/path/go/go/src/github.com/gogs/gogs >GOPATH=/path/to/go:/other/path/to/go make will also build success in this fixed code * in makefile rename gogits to gogs
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index bc20ae5e..e2c08489 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-LDFLAGS += -X "github.com/gogits/gogs/pkg/setting.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')"
-LDFLAGS += -X "github.com/gogits/gogs/pkg/setting.BuildGitHash=$(shell git rev-parse HEAD)"
+LDFLAGS += -X "github.com/gogs/gogs/pkg/setting.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')"
+LDFLAGS += -X "github.com/gogs/gogs/pkg/setting.BuildGitHash=$(shell git rev-parse HEAD)"
DATA_FILES := $(shell find conf | sed 's/ /\\ /g')
LESS_FILES := $(wildcard public/less/gogs.less public/less/_*.less)
@@ -14,6 +14,7 @@ RELEASE_ROOT = "release"
RELEASE_GOGS = "release/gogs"
NOW = $(shell date -u '+%Y%m%d%I%M%S')
GOVET = go tool vet -composites=false -methods=false -structtags=false
+GOPATH = $(shell echo $${PWD%%src*})
.PHONY: build pack release bindata clean