mirror of
				https://github.com/jakeswenson/BitBetter.git
				synced 2025-10-31 12:53:25 +00:00 
			
		
		
		
	Properly detect previous version
This commit is contained in:
		
							parent
							
								
									b75dfb2512
								
							
						
					
					
						commit
						874ff182c6
					
				|  | @ -55,9 +55,12 @@ if ($args[0] -eq 'y') { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| # stop and remove previous existing patch(ed) container | # stop and remove previous existing patch(ed) container | ||||||
| docker stop bitwarden-patch | $oldinstances = docker container ps --all -f Name=bitwarden-patch --format '{{.ID}}' | ||||||
| docker rm bitwarden-patch | foreach ($instance in $oldinstances) { | ||||||
| docker image rm bitwarden-patch | 	docker stop $instance | ||||||
|  | 	docker rm $instance | ||||||
|  | 	docker image rm $instance | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| # start a new bitwarden instance so we can patch it | # start a new bitwarden instance so we can patch it | ||||||
| $patchinstance = docker run -d --name bitwarden-patch ghcr.io/bitwarden/self-host:beta | $patchinstance = docker run -d --name bitwarden-patch ghcr.io/bitwarden/self-host:beta | ||||||
|  |  | ||||||
							
								
								
									
										9
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								build.sh
									
									
									
									
									
								
							|  | @ -58,9 +58,12 @@ else | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| # stop and remove previous existing patch(ed) container | # stop and remove previous existing patch(ed) container | ||||||
| docker stop bitwarden-patch | OLDINSTANCES=$(docker container ps --all -f Name=bitwarden-patch --format '{{.ID}}') | ||||||
| docker rm bitwarden-patch | for INSTANCE in ${OLDINSTANCES[@]}; do | ||||||
| docker image rm bitwarden-patch | 	docker stop $INSTANCE | ||||||
|  | 	docker rm $INSTANCE | ||||||
|  | 	docker image rm $INSTANCE | ||||||
|  | done | ||||||
| 
 | 
 | ||||||
| # start a new bitwarden instance so we can patch it | # start a new bitwarden instance so we can patch it | ||||||
| PATCHINSTANCE=$(docker run -d --name bitwarden-patch ghcr.io/bitwarden/self-host:beta) | PATCHINSTANCE=$(docker run -d --name bitwarden-patch ghcr.io/bitwarden/self-host:beta) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user