forked from ungleich-public/cdist
		
	more verbose, add git tag during release, check lib and changelog
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								ee7f30c052
							
						
					
				
			
			
				commit
				
					
						e330002899
					
				
			
		
					 1 changed files with 13 additions and 8 deletions
				
			
		| 
						 | 
					@ -10,33 +10,38 @@ echo "Preparing next release"
 | 
				
			||||||
echo "Testing documentation..."
 | 
					echo "Testing documentation..."
 | 
				
			||||||
./build clean && ./build man || exit 1
 | 
					./build clean && ./build man || exit 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# get version
 | 
				
			||||||
 | 
					changelog_version=$(head -n1 doc/changelog | sed 's/:.*//')
 | 
				
			||||||
 | 
					#git_version=$(git describe)
 | 
				
			||||||
 | 
					lib_version=$(grep ^VERSION lib/cdist/__init__.py | sed -e 's/.*= //' -e 's/"//g')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Ensure you fixed/prepared version files: $files"
 | 
					echo "Ensure you fixed/prepared version files: $files"
 | 
				
			||||||
 | 
					echo "changelog: $changelog_version"
 | 
				
			||||||
 | 
					#echo "git: $git_version"
 | 
				
			||||||
 | 
					echo "lib: $lib_version"
 | 
				
			||||||
read wait
 | 
					read wait
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# get version
 | 
					if [ "$lib_version" != "$changelog_version ]; then
 | 
				
			||||||
lib_version=$(grep ^VERSION lib/cdist/__init__.py | sed -e 's/.*= //' -e 's/"//g')
 | 
					 | 
				
			||||||
changelog_version=$(head -n1 doc/changelog | sed 's/:.*//')
 | 
					 | 
				
			||||||
git_version=$(git describe)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [ "$lib_version" != "$changelog_version -o "$changelog_version" != "$git_version" ]; then
 | 
					 | 
				
			||||||
    echo "Messed up versions, not releasing"
 | 
					    echo "Messed up versions, not releasing"
 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
version=$git_version
 | 
					version=$lib_version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# get target branch
 | 
					# get target branch
 | 
				
			||||||
branch=${version%.?}
 | 
					branch=${version%.?}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# add tag
 | 
					# add tag
 | 
				
			||||||
printf "Enter description for %s>" "$version"
 | 
					printf "Enter tag description for %s>" "$version"
 | 
				
			||||||
read tagmessage
 | 
					read tagmessage
 | 
				
			||||||
git tag "$version" -m "$tagmessage"
 | 
					git tag "$version" -m "$tagmessage"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Import into current version branch
 | 
					# Import into current version branch
 | 
				
			||||||
 | 
					echo "git merge into $branch"
 | 
				
			||||||
git checkout $branch
 | 
					git checkout $branch
 | 
				
			||||||
git merge master
 | 
					git merge master
 | 
				
			||||||
git checkout master
 | 
					git checkout master
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Publish manpages and sourcecode
 | 
					# Publish manpages and sourcecode
 | 
				
			||||||
 | 
					echo "publising doc/ and code/"
 | 
				
			||||||
./build web
 | 
					./build web
 | 
				
			||||||
./build pub
 | 
					./build pub
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue