mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Use go1.16+ way of installing binaries (#17342)
This commit is contained in:
		
							
								
								
									
										12
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Makefile
									
									
									
									
									
								
							@@ -279,7 +279,7 @@ swagger-validate:
 | 
				
			|||||||
.PHONY: errcheck
 | 
					.PHONY: errcheck
 | 
				
			||||||
errcheck:
 | 
					errcheck:
 | 
				
			||||||
	@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
						@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
				
			||||||
		GO111MODULE=off $(GO) get -u github.com/kisielk/errcheck; \
 | 
							$(GO) install github.com/kisielk/errcheck@8ddee489636a8311a376fc92e27a6a13c6658344; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	@echo "Running errcheck..."
 | 
						@echo "Running errcheck..."
 | 
				
			||||||
	@errcheck $(GO_PACKAGES)
 | 
						@errcheck $(GO_PACKAGES)
 | 
				
			||||||
@@ -287,14 +287,14 @@ errcheck:
 | 
				
			|||||||
.PHONY: revive
 | 
					.PHONY: revive
 | 
				
			||||||
revive:
 | 
					revive:
 | 
				
			||||||
	@hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
						@hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
				
			||||||
		GO111MODULE=off $(GO) get -u github.com/mgechev/revive; \
 | 
							$(GO) install github.com/mgechev/revive@v1.1.2; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	@revive -config .revive.toml -exclude=./vendor/... ./...
 | 
						@revive -config .revive.toml -exclude=./vendor/... ./...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: misspell-check
 | 
					.PHONY: misspell-check
 | 
				
			||||||
misspell-check:
 | 
					misspell-check:
 | 
				
			||||||
	@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
						@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
				
			||||||
		GO111MODULE=off $(GO) get -u github.com/client9/misspell/cmd/misspell; \
 | 
							$(GO) install github.com/client9/misspell/cmd/misspell@v0.3.4; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	@echo "Running misspell-check..."
 | 
						@echo "Running misspell-check..."
 | 
				
			||||||
	@misspell -error -i unknwon $(GO_SOURCES_OWN)
 | 
						@misspell -error -i unknwon $(GO_SOURCES_OWN)
 | 
				
			||||||
@@ -302,7 +302,7 @@ misspell-check:
 | 
				
			|||||||
.PHONY: misspell
 | 
					.PHONY: misspell
 | 
				
			||||||
misspell:
 | 
					misspell:
 | 
				
			||||||
	@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
						@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
				
			||||||
		GO111MODULE=off $(GO) get -u github.com/client9/misspell/cmd/misspell; \
 | 
							$(GO) install github.com/client9/misspell/cmd/misspell@v0.3.4; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	@echo "Running go misspell..."
 | 
						@echo "Running go misspell..."
 | 
				
			||||||
	@misspell -w -i unknwon $(GO_SOURCES_OWN)
 | 
						@misspell -w -i unknwon $(GO_SOURCES_OWN)
 | 
				
			||||||
@@ -350,7 +350,7 @@ watch-frontend: node-check node_modules
 | 
				
			|||||||
.PHONY: watch-backend
 | 
					.PHONY: watch-backend
 | 
				
			||||||
watch-backend: go-check
 | 
					watch-backend: go-check
 | 
				
			||||||
	@hash air > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
						@hash air > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
				
			||||||
		GO111MODULE=off $(GO) get -u github.com/cosmtrek/air; \
 | 
							$(GO) install github.com/cosmtrek/air@bedc18201271882c2be66d216d0e1a275b526ec4; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	air -c .air.conf
 | 
						air -c .air.conf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -661,7 +661,7 @@ release-check: | $(DIST_DIRS)
 | 
				
			|||||||
.PHONY: release-compress
 | 
					.PHONY: release-compress
 | 
				
			||||||
release-compress: | $(DIST_DIRS)
 | 
					release-compress: | $(DIST_DIRS)
 | 
				
			||||||
	@hash gxz > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
						@hash gxz > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
				
			||||||
		GO111MODULE=off $(GO) get -u github.com/ulikunitz/xz/cmd/gxz; \
 | 
							$(GO) install github.com/ulikunitz/xz/cmd/gxz@v0.5.10; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && gxz -k -9 $${file}; done;
 | 
						cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && gxz -k -9 $${file}; done;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user