diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2020-04-05 00:35:02 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-05 11:35:02 +0800 |
commit | b74d30ae275b4f025f689efca748dd0cbd826b22 (patch) | |
tree | 54e04add22ee0d113a96431843f9bc9451809dee | |
parent | 6cf71ee0e8178a2775d2d1041912ca45372805fb (diff) | |
download | gitea-b74d30ae275b4f025f689efca748dd0cbd826b22.tar.gz gitea-b74d30ae275b4f025f689efca748dd0cbd826b22.zip |
Prevent support libraries from compiling into Gitea (#10964)
* Prevent support libraries from compiling into Gitea
* Fix tag position
* Fix golangci-lint errors
* Refactor to make it work
Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | build.go (renamed from build/vendor.go) | 7 | ||||
-rw-r--r-- | main.go | 3 |
3 files changed, 7 insertions, 5 deletions
@@ -301,7 +301,7 @@ unit-test-coverage: .PHONY: vendor vendor: - $(GO) mod tidy && $(GO) mod vendor + $(GO) mod tidy && TAGS="$(TAGS) vendor" $(GO) mod vendor .PHONY: test-vendor test-vendor: vendor diff --git a/build/vendor.go b/build.go index d51fbf21fb..22c6ded99c 100644 --- a/build/vendor.go +++ b/build.go @@ -2,7 +2,12 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package build +//+build vendor + +package main + +// Libraries that are included to vendor utilities used during build. +// These libraries will not be included in a normal compilation. import ( // for lint @@ -21,9 +21,6 @@ import ( _ "code.gitea.io/gitea/modules/markup/markdown" _ "code.gitea.io/gitea/modules/markup/orgmode" - // for build - _ "code.gitea.io/gitea/build" - "github.com/urfave/cli" ) |