mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 21:25:42 +00:00 
			
		
		
		
	Run translation step as part of "update"
This commit is contained in:
		
							
								
								
									
										37
									
								
								tasks.py
									
									
									
									
									
								
							
							
						
						
									
										37
									
								
								tasks.py
									
									
									
									
									
								
							| @@ -175,22 +175,6 @@ def static(c): | |||||||
|     manage(c, "collectstatic --no-input") |     manage(c, "collectstatic --no-input") | ||||||
|  |  | ||||||
|  |  | ||||||
| @task(pre=[install, migrate, static, clean_settings]) |  | ||||||
| def update(c): |  | ||||||
|     """ |  | ||||||
|     Update InvenTree installation. |  | ||||||
|  |  | ||||||
|     This command should be invoked after source code has been updated, |  | ||||||
|     e.g. downloading new code from GitHub. |  | ||||||
|  |  | ||||||
|     The following tasks are performed, in order: |  | ||||||
|  |  | ||||||
|     - install |  | ||||||
|     - migrate |  | ||||||
|     - static |  | ||||||
|     """ |  | ||||||
|     pass |  | ||||||
|  |  | ||||||
| @task(post=[static]) | @task(post=[static]) | ||||||
| def translate(c): | def translate(c): | ||||||
|     """ |     """ | ||||||
| @@ -208,6 +192,25 @@ def translate(c): | |||||||
|  |  | ||||||
|     c.run(f'python {path}') |     c.run(f'python {path}') | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @task(pre=[install, migrate, translate, clean_settings]) | ||||||
|  | def update(c): | ||||||
|  |     """ | ||||||
|  |     Update InvenTree installation. | ||||||
|  |  | ||||||
|  |     This command should be invoked after source code has been updated, | ||||||
|  |     e.g. downloading new code from GitHub. | ||||||
|  |  | ||||||
|  |     The following tasks are performed, in order: | ||||||
|  |  | ||||||
|  |     - install | ||||||
|  |     - migrate | ||||||
|  |     - translate | ||||||
|  |     - clean_settings | ||||||
|  |     """ | ||||||
|  |     pass | ||||||
|  |  | ||||||
|  |  | ||||||
| @task | @task | ||||||
| def style(c): | def style(c): | ||||||
|     """ |     """ | ||||||
| @@ -217,6 +220,7 @@ def style(c): | |||||||
|     print("Running PEP style checks...") |     print("Running PEP style checks...") | ||||||
|     c.run('flake8 InvenTree') |     c.run('flake8 InvenTree') | ||||||
|  |  | ||||||
|  |  | ||||||
| @task | @task | ||||||
| def test(c, database=None): | def test(c, database=None): | ||||||
|     """ |     """ | ||||||
| @@ -228,6 +232,7 @@ def test(c, database=None): | |||||||
|     # Run coverage tests |     # Run coverage tests | ||||||
|     manage(c, 'test', pty=True) |     manage(c, 'test', pty=True) | ||||||
|  |  | ||||||
|  |  | ||||||
| @task | @task | ||||||
| def coverage(c): | def coverage(c): | ||||||
|     """ |     """ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user