mirror of
				https://github.com/appleboy/drone-ssh.git
				synced 2025-10-29 00:51:15 +08:00 
			
		
		
		
	refactor: hash is a much faster shell-builtin alternative to which.
This commit is contained in:
		
							parent
							
								
									b0fa6ba5b1
								
							
						
					
					
						commit
						37af3419ca
					
				
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							| @ -34,19 +34,19 @@ vet: | ||||
| 	go vet $(PACKAGES) | ||||
| 
 | ||||
| errcheck: | ||||
| 	@which errcheck > /dev/null; if [ $$? -ne 0 ]; then \
 | ||||
| 	@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | ||||
| 		go get -u github.com/kisielk/errcheck; \
 | ||||
| 	fi | ||||
| 	errcheck $(PACKAGES) | ||||
| 
 | ||||
| lint: | ||||
| 	@which golint > /dev/null; if [ $$? -ne 0 ]; then \
 | ||||
| 	@hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | ||||
| 		go get -u github.com/golang/lint/golint; \
 | ||||
| 	fi | ||||
| 	for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done; | ||||
| 
 | ||||
| unconvert: | ||||
| 	@which unconvert > /dev/null; if [ $$? -ne 0 ]; then \
 | ||||
| 	@hash unconvert > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | ||||
| 		go get -u github.com/mdempsky/unconvert; \
 | ||||
| 	fi | ||||
| 	for PKG in $(PACKAGES); do unconvert -v $$PKG || exit 1; done; | ||||
| @ -71,7 +71,7 @@ release-dirs: | ||||
| 	mkdir -p $(DIST)/binaries $(DIST)/release | ||||
| 
 | ||||
| release-build: | ||||
| 	@which gox > /dev/null; if [ $$? -ne 0 ]; then \
 | ||||
| 	@hash gox > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | ||||
| 		go get -u github.com/mitchellh/gox; \
 | ||||
| 	fi | ||||
| 	gox -os="$(TARGETS)" -arch="amd64 386" -tags="$(TAGS)" -ldflags="-s -w $(LDFLAGS)" -output="$(DIST)/binaries/$(EXECUTABLE)-$(VERSION)-{{.OS}}-{{.Arch}}" | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Bo-Yi Wu
						Bo-Yi Wu