| 
									
										
										
										
											2011-11-18 15:45:59 +01:00
										 |  |  | #!/bin/sh | 
					
						
							|  |  |  | # Nico Schottelius | 
					
						
							| 
									
										
										
										
											2011-04-19 22:40:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-18 15:45:59 +01:00
										 |  |  | files="doc/changelog lib/cdist/__init__.py" | 
					
						
							| 
									
										
										
										
											2011-04-19 22:34:47 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-19 22:34:13 +02:00
										 |  |  | # Stuff to take care of when doing a release | 
					
						
							| 
									
										
										
										
											2011-04-19 22:34:47 +02:00
										 |  |  | echo "Preparing next release" | 
					
						
							| 
									
										
										
										
											2011-04-19 22:34:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-19 22:40:51 +02:00
										 |  |  | # Ensure documentation builds cleanly | 
					
						
							| 
									
										
										
										
											2011-11-18 15:45:59 +01:00
										 |  |  | echo "Testing documentation..." | 
					
						
							|  |  |  | ./build clean && ./build man || exit 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo "Ensure you fixed/prepared version files: $files" | 
					
						
							|  |  |  | read wait | 
					
						
							| 
									
										
										
										
											2011-04-19 22:40:51 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | # get version | 
					
						
							| 
									
										
										
										
											2011-11-18 15:45:59 +01:00
										 |  |  | 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" | 
					
						
							|  |  |  |     exit 1 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | version=$git_version | 
					
						
							| 
									
										
										
										
											2011-04-19 22:40:51 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | # get target branch | 
					
						
							|  |  |  | branch=${version%.?} | 
					
						
							| 
									
										
										
										
											2011-04-19 22:34:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-19 22:43:49 +02:00
										 |  |  | # add tag | 
					
						
							|  |  |  | printf "Enter description for %s>" "$version" | 
					
						
							|  |  |  | read tagmessage | 
					
						
							| 
									
										
										
										
											2011-05-10 15:51:08 +02:00
										 |  |  | git tag "$version" -m "$tagmessage" | 
					
						
							| 
									
										
										
										
											2011-04-19 22:43:49 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-19 22:34:13 +02:00
										 |  |  | # Import into current version branch | 
					
						
							| 
									
										
										
										
											2011-04-19 22:40:51 +02:00
										 |  |  | git checkout $branch | 
					
						
							| 
									
										
										
										
											2011-04-19 22:34:13 +02:00
										 |  |  | git merge master | 
					
						
							| 
									
										
										
										
											2011-04-19 22:48:28 +02:00
										 |  |  | git checkout master | 
					
						
							| 
									
										
										
										
											2011-04-19 22:34:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-19 22:40:51 +02:00
										 |  |  | # Publish manpages and sourcecode | 
					
						
							| 
									
										
										
										
											2011-11-18 15:45:59 +01:00
										 |  |  | ./build web | 
					
						
							|  |  |  | ./build pub |