| 
									
										
										
										
											2024-08-27 19:25:58 -05:00
										 |  |  | # -*- coding: utf-8; -*- | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | Tasks for Wutta-Continuum | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import os | 
					
						
							|  |  |  | import shutil | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | from invoke import task | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @task | 
					
						
							|  |  |  | def release(c, skip_tests=False): | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  |     Release a new version of Wutta-Continuum | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  |     if not skip_tests: | 
					
						
							| 
									
										
										
										
											2025-08-31 12:45:58 -05:00
										 |  |  |         c.run("pytest") | 
					
						
							| 
									
										
										
										
											2024-08-27 19:25:58 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-08-31 12:45:58 -05:00
										 |  |  |     if os.path.exists("dist"): | 
					
						
							|  |  |  |         shutil.rmtree("dist") | 
					
						
							| 
									
										
										
										
											2024-08-27 19:25:58 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-08-31 12:45:58 -05:00
										 |  |  |     c.run("python -m build --sdist") | 
					
						
							|  |  |  |     c.run("twine upload dist/*") |