mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	This allows us to have a single number to update when doing a release. This drops WLR_VERSION_API_* definitions.
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			602 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			602 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/sh -eu
 | 
						|
old_version="$1"
 | 
						|
new_version="$2"
 | 
						|
sed -i meson.build -e "s/version: '$old_version'/version: '$new_version'/g"
 | 
						|
 | 
						|
bugfix='n'
 | 
						|
printf "Breaking API changes? (y/n) "
 | 
						|
read breaking
 | 
						|
if [ "$breaking" = 'n' ]
 | 
						|
then
 | 
						|
	printf "Bugfix release (no backwards-incompatible ABI changes)? (y/n) "
 | 
						|
	read bugfix
 | 
						|
fi
 | 
						|
 | 
						|
soversion=$(egrep '^soversion =' meson.build | cut -d'=' -f2-)
 | 
						|
soversion=$((soversion))
 | 
						|
 | 
						|
if [ "$bugfix" != 'y' ]
 | 
						|
then
 | 
						|
	soversion=$((soversion+1))
 | 
						|
fi
 | 
						|
 | 
						|
sed -i meson.build \
 | 
						|
	-e "s/soversion = .*/soversion = $soversion/g"
 | 
						|
 | 
						|
exit 1
 | 
						|
git add meson.build
 | 
						|
git commit -m "Update version to $new_version"
 |