build: add release task
This commit is contained in:
		
							parent
							
								
									86abdea9d7
								
							
						
					
					
						commit
						87d84f005a
					
				
					 1 changed files with 23 additions and 0 deletions
				
			
		
							
								
								
									
										23
									
								
								tasks.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								tasks.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | ||||||
|  | # -*- coding: utf-8; -*- | ||||||
|  | """ | ||||||
|  | Tasks for rattail-demo | ||||||
|  | """ | ||||||
|  | 
 | ||||||
|  | import os | ||||||
|  | import shutil | ||||||
|  | 
 | ||||||
|  | from invoke import task | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | @task | ||||||
|  | def release(c): | ||||||
|  |     """ | ||||||
|  |     Release a new version of 'rattail-demo' | ||||||
|  |     """ | ||||||
|  |     if os.path.exists('dist'): | ||||||
|  |         shutil.rmtree('dist') | ||||||
|  |     if os.path.exists('rattail_demo.egg-info'): | ||||||
|  |         shutil.rmtree('rattail_demo.egg-info') | ||||||
|  | 
 | ||||||
|  |     c.run('python -m build --sdist') | ||||||
|  |     c.run('twine upload dist/*') | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar