25 lines
		
	
	
	
		
			540 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			540 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
set -exuo pipefail
 | 
						|
. make/lib.sh
 | 
						|
 | 
						|
gimli_only
 | 
						|
only_in_directory "$PRODWEB"
 | 
						|
 | 
						|
CURRENT_BRANCH="$(git branch --show-current)"
 | 
						|
BRANCH="${1:-$CURRENT_BRANCH}"
 | 
						|
 | 
						|
if test "$BRANCH" != master
 | 
						|
then
 | 
						|
	echo "Pozor, nasazuješ na produkci větev, která není master ($BRANCH), chceš pokračovat? Pokud ne, sestřel tento skript."
 | 
						|
	read
 | 
						|
fi
 | 
						|
 | 
						|
# Záloha DB
 | 
						|
( cd -P .. && ./backup_prod_db.sh )
 | 
						|
 | 
						|
safe_checkout_branch "$BRANCH"
 | 
						|
 | 
						|
# Teď máme správnou větev, jdeme vše nainstalovat
 | 
						|
install_everything
 | 
						|
systemctl --user restart mamweb-prod.service
 |