Makefile: fix default target and TAG var
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
		
							parent
							
								
									b8d8a52ff7
								
							
						
					
					
						commit
						236f76394e
					
				
							
								
								
									
										6
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										6
									
								
								Makefile
								
								
								
								
							|  | @ -3,7 +3,8 @@ PKGS    := $(shell go list ./... | grep -v /vendor/) | |||
| 
 | ||||
| INSTALL_DEPS ?= 0 | ||||
| 
 | ||||
| TAG  ?= $(shell git describe --tags --abbrev=0 HEAD) | ||||
| TAG  ?= $(shell git describe --tags --abbrev=0 HEAD 2>/dev/null || echo "v0.0.1") | ||||
| 
 | ||||
| LAST = $(shell git describe --tags --abbrev=0 HEAD^) | ||||
| BODY = "`git log ${LAST}..HEAD --oneline --decorate` `printf '\n\#\#\# [Build Info](${BUILD_URL})'`" | ||||
| DATE_FMT = +"%Y-%m-%dT%H:%M:%S%z" | ||||
|  | @ -29,6 +30,9 @@ define check_command | |||
| 	command -v $(1) >/dev/null | ||||
| endef | ||||
| 
 | ||||
| all: build | ||||
| .PHONY: all | ||||
| 
 | ||||
| # Install all required Go tools
 | ||||
| install-go-deps: | ||||
| 	@echo "Installing Go dependencies..." | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue