Finalize test-deploy makefile
This commit is contained in:
		
							parent
							
								
									568f4e9fd8
								
							
						
					
					
						commit
						b8113d285c
					
				
					 1 changed files with 19 additions and 0 deletions
				
			
		
							
								
								
									
										19
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								Makefile
									
									
									
									
									
								
							|  | @ -42,5 +42,24 @@ clean_virtualenv: | ||||||
| 	rm -rf virtualenv/ | 	rm -rf virtualenv/ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | TEST_USER=${USER} | ||||||
|  | TEST_SERVER=atrey.karlin.mff.cuni.cz | ||||||
|  | TEST_DIR=/akce/MaM/MaMweb/test/ | ||||||
|  | 
 | ||||||
|  | # remote commands
 | ||||||
|  | HEAD=`git log --color=never |head -1|sed 's/.*commit //'` | ||||||
|  | push_test: | ||||||
|  | 	@echo "Checking out commited HEAD (${HEAD}) state at ${TEST_SSH} ..." | ||||||
|  | 	git push --all | ||||||
|  | 	ssh ${TEST_USER}@${TEST_SERVER} -n -x "\
 | ||||||
|  | 		cd ${TEST_DIR} && \
 | ||||||
|  | 		git fetch --all && \
 | ||||||
|  | 		git checkout ${HEAD} -f && \
 | ||||||
|  | 		git clean -f && \
 | ||||||
|  | 		cp mamweb/settings_test.py mamweb/settings.py && \
 | ||||||
|  | 		make install && \
 | ||||||
|  | 		./manage.py migrate --noinput && \
 | ||||||
|  | 		echo Done."
 | ||||||
|  | 	@echo "Test deployed at ${TEST_SERVER}:${TEST_DIR} successfully." | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Tomas Gavenciak
						Tomas Gavenciak