mirror of https://github.com/tteck/Proxmox.git
				
				
				
			
							parent
							
								
									3fd87569df
								
							
						
					
					
						commit
						634283c04e
					
				| 
						 | 
					@ -94,7 +94,13 @@ function update_script() {
 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  echo "Initiating update"
 | 
					  echo "Checking if any changes were made to package-lock.json..."
 | 
				
			||||||
 | 
					  git checkout package-lock.json || {
 | 
				
			||||||
 | 
					    echo "Failed to check package-lock.json."
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  echo "Initiating update..."
 | 
				
			||||||
  if ! git pull; then
 | 
					  if ! git pull; then
 | 
				
			||||||
    echo "Update failed, temporarily storing changes and trying again."
 | 
					    echo "Update failed, temporarily storing changes and trying again."
 | 
				
			||||||
    git stash && git pull || (
 | 
					    git stash && git pull || (
 | 
				
			||||||
| 
						 | 
					@ -109,6 +115,12 @@ function update_script() {
 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  echo "Building..."
 | 
				
			||||||
 | 
					  npm run build || {
 | 
				
			||||||
 | 
					    echo "Failed to build new version."
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  echo "Restoring configuration..."
 | 
					  echo "Restoring configuration..."
 | 
				
			||||||
  cp -R data-backup/* data || {
 | 
					  cp -R data-backup/* data || {
 | 
				
			||||||
    echo "Failed to restore configuration."
 | 
					    echo "Failed to restore configuration."
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue