Skip to content

Commit b74d30a

Browse files
authored
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 <[email protected]>
1 parent 6cf71ee commit b74d30a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ unit-test-coverage:
301301

302302
.PHONY: vendor
303303
vendor:
304-
$(GO) mod tidy && $(GO) mod vendor
304+
$(GO) mod tidy && TAGS="$(TAGS) vendor" $(GO) mod vendor
305305

306306
.PHONY: test-vendor
307307
test-vendor: vendor

build/vendor.go renamed to build.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
44

5-
package build
5+
//+build vendor
6+
7+
package main
8+
9+
// Libraries that are included to vendor utilities used during build.
10+
// These libraries will not be included in a normal compilation.
611

712
import (
813
// for lint

main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ import (
2121
_ "code.gitea.io/gitea/modules/markup/markdown"
2222
_ "code.gitea.io/gitea/modules/markup/orgmode"
2323

24-
// for build
25-
_ "code.gitea.io/gitea/build"
26-
2724
"github.com/urfave/cli"
2825
)
2926

0 commit comments

Comments
 (0)