mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	More tweaks to semver
This commit is contained in:
		
							parent
							
								
									3ea33c9fa7
								
							
						
					
					
						commit
						09ea9a166f
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -52,8 +52,8 @@ else
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Get the number of merges on the current branch since the last tag
 | 
					# Get the number of merges on the current branch since the last tag
 | 
				
			||||||
TAG=$(git describe --abbrev=0 --tags --match="v[0-9]*\.[0-9]*\.[0-9]*" 2>/dev/null)
 | 
					TAG=$(git describe --abbrev=0 --tags --match="v[0-9]*\.[0-9]*\.[0-9]*" --first-parent master 2>/dev/null)
 | 
				
			||||||
BUILD=$(git rev-list $TAG..$BRANCH --count)
 | 
					BUILD=$(git rev-list $TAG.. --count)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Add the build tag on non-master branches
 | 
					# Add the build tag on non-master branches
 | 
				
			||||||
if [ $BRANCH != "master" ]; then
 | 
					if [ $BRANCH != "master" ]; then
 | 
				
			||||||
| 
						 | 
					@ -62,6 +62,6 @@ if [ $BRANCH != "master" ]; then
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  if [ $BUILD != 0 ]; then
 | 
					  if [ $BUILD != 0 ]; then
 | 
				
			||||||
    printf -- "-%d" "$BUILD"
 | 
					    printf -- "-%d" "$(($BUILD+1))"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue