Tweak backup-everything script just a bit more
check git status of rattail src prior to upgrading that, etc.
This commit is contained in:
		
							parent
							
								
									2fcb81e0ae
								
							
						
					
					
						commit
						d519db62bd
					
				
					 3 changed files with 18 additions and 11 deletions
				
			
		|  | @ -76,6 +76,7 @@ def deploy_backup_app(deploy, envname, mkvirtualenv=True, user='rattail', | |||
|             sudo('git clone https://rattailproject.org/git/rattail.git src/rattail', user=user) | ||||
|         with cd('src/rattail'): | ||||
|             sudo('git pull', user=user) | ||||
|             deploy_generic('backup/git-exclude', '.git/info/exclude', owner=user) | ||||
|         sudo('bin/pip install --upgrade --upgrade-strategy eager --editable src/rattail', user=user) | ||||
| 
 | ||||
|         # TODO: this should not be necessary | ||||
|  |  | |||
|  | @ -4,27 +4,32 @@ if [ "$1" = "-v" -o "$1" = "--verbose" ]; then | |||
|     VERBOSE='--verbose' | ||||
|     QUIET= | ||||
|     PROGRESS='--progress' | ||||
|     CONFIG='app/rattail.conf' | ||||
|     CONFIG='/srv/envs/${envname}/app/rattail.conf' | ||||
| else | ||||
|     VERBOSE= | ||||
|     QUIET='--quiet' | ||||
|     PROGRESS= | ||||
|     CONFIG='app/silent.conf' | ||||
|     CONFIG='/srv/envs/${envname}/app/silent.conf' | ||||
| fi | ||||
| 
 | ||||
| 
 | ||||
| cd /srv/envs/${envname} | ||||
| RATTAIL="/srv/envs/${envname}/bin/rattail --config=$CONFIG $PROGRESS" | ||||
| PIP=/srv/envs/${envname}/bin/pip | ||||
| export PIP_CONFIG_FILE=/srv/envs/${envname}/pip.conf | ||||
| 
 | ||||
| RATTAIL="bin/rattail --config=$CONFIG $PROGRESS" | ||||
| PIP='bin/pip' | ||||
| export PIP_CONFIG_FILE=pip.conf | ||||
| # upgrade pip | ||||
| $PIP install $QUIET --upgrade pip | ||||
| 
 | ||||
| $PIP install --upgrade pip | ||||
| 
 | ||||
| cd src/rattail | ||||
| # upgrade rattail | ||||
| cd /srv/envs/${envname}/src/rattail | ||||
| if [ "$(sudo -u ${user} git status --porcelain)" != '' ]; then | ||||
|    sudo -u ${user} git status | ||||
|    exit 1 | ||||
| fi | ||||
| sudo -u ${user} git pull $QUIET | ||||
| sudo -u ${user} find . -name '*.pyc' -delete | ||||
| cd - | ||||
| $PIP install --upgrade --upgrade-strategy eager --editable src/rattail | ||||
| $PIP install $QUIET --upgrade --upgrade-strategy eager --editable . | ||||
| 
 | ||||
| # run backup | ||||
| cd /srv/envs/${envname} | ||||
| $RATTAIL backup | ||||
|  |  | |||
							
								
								
									
										1
									
								
								rattail_fabric/deploy/backup/git-exclude
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								rattail_fabric/deploy/backup/git-exclude
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| **/__pycache__/ | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar