-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into make-avatar-lookup-image
- Loading branch information
Showing
102 changed files
with
1,696 additions
and
2,868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ GO ?= go | |
SED_INPLACE := sed -i | ||
SHASUM ?= shasum -a 256 | ||
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" ) | ||
COMMA := , | ||
|
||
ifeq ($(HAS_GO), GO) | ||
GOPATH ?= $(shell $(GO) env GOPATH) | ||
|
@@ -16,22 +17,14 @@ endif | |
|
||
ifeq ($(OS), Windows_NT) | ||
EXECUTABLE ?= gitea.exe | ||
FIND_PWD_REGEXP := find . -regextype posix-egrep | ||
else | ||
EXECUTABLE ?= gitea | ||
UNAME_S := $(shell uname -s) | ||
FIND_PWD_REGEXP := find . -regextype posix-egrep | ||
BUSYBOX := $(shell find --help 2>&1 | grep -o BusyBox) | ||
ifeq ($(UNAME_S),Darwin) | ||
SED_INPLACE := sed -i '' | ||
FIND_PWD_REGEXP := find -E . | ||
endif | ||
ifeq ($(UNAME_S),FreeBSD) | ||
SED_INPLACE := sed -i '' | ||
FIND_PWD_REGEXP := find -E . | ||
endif | ||
ifeq ($(BUSYBOX),BusyBox) | ||
FIND_PWD_REGEXP := find . | ||
endif | ||
endif | ||
|
||
|
@@ -71,9 +64,6 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G | |
|
||
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell GO111MODULE=on $(GO) list -mod=vendor ./... | grep -v /vendor/))) | ||
|
||
GO_SOURCES ?= $(shell $(FIND_PWD_REGEXP) -regex '\./(node_modules|docs|public|options|contrib|data)' -prune -o -name "*.go" -type f -print) | ||
GO_SOURCES_OWN := $(filter-out ./vendor/% %/bindata.go, $(GO_SOURCES)) | ||
|
||
WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f) | ||
WEBPACK_CONFIGS := webpack.config.js .eslintrc .stylelintrc | ||
WEBPACK_DEST := public/js/index.js public/css/index.css | ||
|
@@ -82,13 +72,24 @@ WEBPACK_DEST_DIRS := public/js public/css | |
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go | ||
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST)) | ||
|
||
TAGS ?= | ||
TAGS_SPLIT := $(subst $(COMMA), ,$(TAGS)) | ||
TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags | ||
|
||
GO_DIRS := cmd integrations models modules routers scripts services vendor | ||
GO_SOURCES := $(wildcard *.go) | ||
GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go) | ||
|
||
ifeq ($(filter $(TAGS_SPLIT),bindata),bindata) | ||
GO_SOURCES += $(BINDATA_DEST) | ||
endif | ||
|
||
GO_SOURCES_OWN := $(filter-out vendor/% %/bindata.go, $(GO_SOURCES)) | ||
|
||
FOMANTIC_CONFIGS := semantic.json web_src/fomantic/theme.config.less web_src/fomantic/_site/globals/site.variables | ||
FOMANTIC_DEST := public/fomantic/semantic.min.js public/fomantic/semantic.min.css | ||
FOMANTIC_DEST_DIR := public/fomantic | ||
|
||
TAGS ?= | ||
TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags | ||
|
||
#To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/[email protected] | ||
SWAGGER := GO111MODULE=on $(GO) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger | ||
SWAGGER_SPEC := templates/swagger/v1_json.tmpl | ||
|
@@ -145,7 +146,7 @@ help: | |
go-check: | ||
$(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell go version | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?[[:space:]]' | tr '.' ' ');)) | ||
@if [ "$(GO_VERSION)" -lt "001011000" ]; then \ | ||
echo "Gitea requires Go 1.11.0 or greater to build. You can get it at https://golang.org/dl/"; \ | ||
echo "Gitea requires Go 1.11 or greater to build. You can get it at https://golang.org/dl/"; \ | ||
exit 1; \ | ||
fi | ||
|
||
|
@@ -161,7 +162,7 @@ node-check: | |
$(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?' | tr '.' ' ');)) | ||
$(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1)) | ||
@if [ "$(NODE_VERSION)" -lt "010000000" -o "$(NPM_MISSING)" = "1" ]; then \ | ||
echo "Gitea requires Node.js 10.0.0 or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \ | ||
echo "Gitea requires Node.js 10 or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \ | ||
exit 1; \ | ||
fi | ||
|
||
|
@@ -258,7 +259,7 @@ fmt-check: | |
test: | ||
GO111MODULE=on $(GO) test $(GOTESTFLAGS) -mod=vendor -tags='sqlite sqlite_unlock_notify' $(PACKAGES) | ||
|
||
PHONY: test-check | ||
.PHONY: test-check | ||
test-check: | ||
@echo "Checking if tests have changed the source tree..."; | ||
@diff=$$(git status -s); \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.