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>
This commit is contained in:
		
							parent
							
								
									6cf71ee0e8
								
							
						
					
					
						commit
						b74d30ae27
					
				
					 3 changed files with 7 additions and 5 deletions
				
			
		
							
								
								
									
										2
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
					@ -301,7 +301,7 @@ unit-test-coverage:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: vendor
 | 
					.PHONY: vendor
 | 
				
			||||||
vendor:
 | 
					vendor:
 | 
				
			||||||
	$(GO) mod tidy && $(GO) mod vendor
 | 
						$(GO) mod tidy && TAGS="$(TAGS) vendor" $(GO) mod vendor
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: test-vendor
 | 
					.PHONY: test-vendor
 | 
				
			||||||
test-vendor: vendor
 | 
					test-vendor: vendor
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,12 @@
 | 
				
			||||||
// Use of this source code is governed by a MIT-style
 | 
					// Use of this source code is governed by a MIT-style
 | 
				
			||||||
// license that can be found in the LICENSE file.
 | 
					// 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 (
 | 
					import (
 | 
				
			||||||
	// for lint
 | 
						// for lint
 | 
				
			||||||
							
								
								
									
										3
									
								
								main.go
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								main.go
									
										
									
									
									
								
							| 
						 | 
					@ -21,9 +21,6 @@ import (
 | 
				
			||||||
	_ "code.gitea.io/gitea/modules/markup/markdown"
 | 
						_ "code.gitea.io/gitea/modules/markup/markdown"
 | 
				
			||||||
	_ "code.gitea.io/gitea/modules/markup/orgmode"
 | 
						_ "code.gitea.io/gitea/modules/markup/orgmode"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// for build
 | 
					 | 
				
			||||||
	_ "code.gitea.io/gitea/build"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"github.com/urfave/cli"
 | 
						"github.com/urfave/cli"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue