| 
									
										
										
										
											2024-09-17 07:53:43 -07:00
										 |  |  | #!/bin/bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | set -e | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-17 15:06:59 +00:00
										 |  |  | TAG=$(python -c 'from pdelfin.version import VERSION; print("v" + VERSION)') | 
					
						
							| 
									
										
										
										
											2024-09-17 07:53:43 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | read -p "Creating new release for $TAG. Do you want to continue? [Y/n] " prompt | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then | 
					
						
							|  |  |  |     python scripts/prepare_changelog.py | 
					
						
							|  |  |  |     git add -A | 
					
						
							|  |  |  |     git commit -m "Bump version to $TAG for release" || true && git push | 
					
						
							|  |  |  |     echo "Creating new git tag $TAG" | 
					
						
							|  |  |  |     git tag "$TAG" -m "$TAG" | 
					
						
							|  |  |  |     git push --tags | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  |     echo "Cancelled" | 
					
						
							|  |  |  |     exit 1 | 
					
						
							|  |  |  | fi |