mirror of
				https://github.com/appleboy/drone-ssh.git
				synced 2025-10-29 00:51:15 +08:00 
			
		
		
		
	chore(CI): update version check.
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
		
							parent
							
								
									df6997a8e1
								
							
						
					
					
						commit
						31c298bb19
					
				
							
								
								
									
										18
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								Makefile
									
									
									
									
									
								
							| @ -39,24 +39,10 @@ else | |||||||
| 	EXECUTABLE ?= $(EXECUTABLE) | 	EXECUTABLE ?= $(EXECUTABLE) | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| STORED_VERSION_FILE := VERSION |  | ||||||
| 
 |  | ||||||
| ifneq ($(DRONE_TAG),) | ifneq ($(DRONE_TAG),) | ||||||
| 	VERSION ?= $(subst v,,$(DRONE_TAG)) | 	VERSION ?= $(DRONE_TAG) | ||||||
| 	RELASE_VERSION ?= $(VERSION) |  | ||||||
| else | else | ||||||
| 	ifneq ($(DRONE_BRANCH),) | 	VERSION ?= $(shell git describe --tags --always || git rev-parse --short HEAD) | ||||||
| 		VERSION ?= $(subst release/v,,$(DRONE_BRANCH)) |  | ||||||
| 	else |  | ||||||
| 		VERSION ?= master |  | ||||||
| 	endif |  | ||||||
| 
 |  | ||||||
| 	STORED_VERSION=$(shell cat $(STORED_VERSION_FILE) 2>/dev/null) |  | ||||||
| 	ifneq ($(STORED_VERSION),) |  | ||||||
| 		RELASE_VERSION ?= $(STORED_VERSION) |  | ||||||
| 	else |  | ||||||
| 		RELASE_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//') |  | ||||||
| 	endif |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| TAGS ?= | TAGS ?= | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Bo-Yi.Wu
						Bo-Yi.Wu