You've already forked prometheus-fail2ban-exporter
							
							chore(Makefile): add GONOSUMDB and GOPROXY
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							
								
								
									
										24
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								Makefile
									
									
									
									
									
								
							| @@ -12,29 +12,48 @@ ls: | |||||||
| # Download dependencies | # Download dependencies | ||||||
| .PHONY: download | .PHONY: download | ||||||
| download: | download: | ||||||
|  | 	GONOSUMDB=${GONOSUMDB} \ | ||||||
|  | 	GOPROXY=${GOPROXY} \ | ||||||
| 		go mod download | 		go mod download | ||||||
|  |  | ||||||
| # Update project dependencies | # Update project dependencies | ||||||
| .PHONY: update | .PHONY: update | ||||||
| update: | update: | ||||||
|  | 	GONOSUMDB=${GONOSUMDB} \ | ||||||
|  | 	GOPROXY=${GOPROXY} \ | ||||||
| 		go get -u | 		go get -u | ||||||
|  |  | ||||||
|  | 	GONOSUMDB=${GONOSUMDB} \ | ||||||
|  | 	GOPROXY=${GOPROXY} \ | ||||||
| 		go mod download | 		go mod download | ||||||
|  |  | ||||||
|  | 	GONOSUMDB=${GONOSUMDB} \ | ||||||
|  | 	GOPROXY=${GOPROXY} \ | ||||||
| 		go mod tidy | 		go mod tidy | ||||||
|  |  | ||||||
| # Run project tests | # Run project tests | ||||||
| .PHONY: test | .PHONY: test | ||||||
| test: download | test: download | ||||||
|  | 	GONOSUMDB=${GONOSUMDB} \ | ||||||
|  | 	GOPROXY=${GOPROXY} \ | ||||||
| 		go test ./... -v -race | 		go test ./... -v -race | ||||||
|  |  | ||||||
| # Look for "suspicious constructs" in source code | # Look for "suspicious constructs" in source code | ||||||
| .PHONY: vet | .PHONY: vet | ||||||
| vet: download | vet: download | ||||||
|  | 	GONOSUMDB=${GONOSUMDB} \ | ||||||
|  | 	GOPROXY=${GOPROXY} \ | ||||||
| 		go vet ./... | 		go vet ./... | ||||||
|  |  | ||||||
| # Format code | # Format code | ||||||
| .PHONY: fmt | .PHONY: fmt | ||||||
| fmt: download | fmt: download | ||||||
|  | 	GONOSUMDB=${GONOSUMDB} \ | ||||||
|  | 	GOPROXY=${GOPROXY} \ | ||||||
| 		go mod tidy | 		go mod tidy | ||||||
|  |  | ||||||
|  | 	GONOSUMDB=${GONOSUMDB} \ | ||||||
|  | 	GOPROXY=${GOPROXY} \ | ||||||
| 		go fmt ./... | 		go fmt ./... | ||||||
|  |  | ||||||
| # Check for unformatted go code | # Check for unformatted go code | ||||||
| @@ -45,7 +64,10 @@ check/fmt: download | |||||||
| # Build project | # Build project | ||||||
| .PHONY: build | .PHONY: build | ||||||
| build: | build: | ||||||
| 	CGO_ENABLED=0 go build \ | 	CGO_ENABLED=0 | ||||||
|  | 	GONOSUMDB=${GONOSUMDB} \ | ||||||
|  | 	GOPROXY=${GOPROXY} \ | ||||||
|  | 		go build \ | ||||||
| 			-ldflags "\ | 			-ldflags "\ | ||||||
| 				-X main.version=${shell git describe --tags} \ | 				-X main.version=${shell git describe --tags} \ | ||||||
| 				-X main.commit=${shell git rev-parse HEAD} \ | 				-X main.commit=${shell git rev-parse HEAD} \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user