mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	Fix build tags maybe?
This commit is contained in:
		
							parent
							
								
									bfdb079b79
								
							
						
					
					
						commit
						3ea33c9fa7
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
					@ -33,9 +33,6 @@ if [ $? != 0 ]; then
 | 
				
			||||||
  exit 1
 | 
					  exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Get the number of merges on the current branch since the last tag
 | 
					 | 
				
			||||||
BUILD=$(git rev-list $TAG..HEAD --count --merges)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Split out into major, minor and patch numbers
 | 
					# Split out into major, minor and patch numbers
 | 
				
			||||||
MAJOR=$(echo $TAG | cut -c 2- | cut -d "." -f 1)
 | 
					MAJOR=$(echo $TAG | cut -c 2- | cut -d "." -f 1)
 | 
				
			||||||
MINOR=$(echo $TAG | cut -c 2- | cut -d "." -f 2)
 | 
					MINOR=$(echo $TAG | cut -c 2- | cut -d "." -f 2)
 | 
				
			||||||
| 
						 | 
					@ -54,6 +51,10 @@ else
 | 
				
			||||||
  printf '%s%d.%d.%d' "$PREPEND" "$MAJOR" "$MINOR" "$PATCH"
 | 
					  printf '%s%d.%d.%d' "$PREPEND" "$MAJOR" "$MINOR" "$PATCH"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 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)
 | 
				
			||||||
 | 
					BUILD=$(git rev-list $TAG..$BRANCH --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
 | 
				
			||||||
  if [ $BUILD != 0 ]; then
 | 
					  if [ $BUILD != 0 ]; then
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue