forked from OpenWF/SpaceNinjaServer
		
	In that case, updating is obviously not possible. Reviewed-on: OpenWF/SpaceNinjaServer#2702 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
		
			
				
	
	
		
			25 lines
		
	
	
		
			477 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			477 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
echo "Updating SpaceNinjaServer..."
 | 
						|
git fetch --prune
 | 
						|
if [ $? -eq 0 ]; then
 | 
						|
    git stash
 | 
						|
    git checkout -f origin/main
 | 
						|
 | 
						|
    if [ -d "static/data/0/" ]; then
 | 
						|
        echo "Updating stripped assets..."
 | 
						|
        cd static/data/0/
 | 
						|
        git pull
 | 
						|
        cd ../../../
 | 
						|
    fi
 | 
						|
 | 
						|
    echo "Updating dependencies..."
 | 
						|
    npm i --omit=dev
 | 
						|
 | 
						|
    npm run build
 | 
						|
    if [ $? -eq 0 ]; then
 | 
						|
        npm run start
 | 
						|
        echo "SpaceNinjaServer seems to have crashed."
 | 
						|
    fi
 | 
						|
fi
 |