mirror of
				https://github.com/jakeswenson/BitBetter.git
				synced 2025-10-31 12:53:25 +00:00 
			
		
		
		
	Merge branch 'unified' into unified-patch
This commit is contained in:
		
						commit
						26732b3050
					
				
							
								
								
									
										10
									
								
								build.ps1
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								build.ps1
									
									
									
									
									
								
							|  | @ -39,7 +39,7 @@ Remove-Item "$pwd\src\bitBetter\cert.cert" -Force | ||||||
| # gather all running instances | # gather all running instances | ||||||
| $oldinstances = docker container ps --all -f Name=bitwarden --format '{{.ID}}' | $oldinstances = docker container ps --all -f Name=bitwarden --format '{{.ID}}' | ||||||
| 
 | 
 | ||||||
| # stop all running instances | # stop and remove all running instances | ||||||
| foreach ($instance in $oldinstances) { | foreach ($instance in $oldinstances) { | ||||||
| 	docker stop $instance | 	docker stop $instance | ||||||
| 	docker rm $instance | 	docker rm $instance | ||||||
|  | @ -58,10 +58,10 @@ else | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| # stop and remove previous existing patch(ed) container | # remove previous existing patch(ed) image | ||||||
| docker stop bitwarden-patch | if (docker image ls -q bitwarden-patch) { | ||||||
| docker rm bitwarden-patch |     docker image rm bitwarden-patch | ||||||
| docker image rm bitwarden-patch | } | ||||||
| 
 | 
 | ||||||
| # 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 | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								build.sh
									
									
									
									
									
								
							|  | @ -40,7 +40,7 @@ rm -f "$PWD/src/bitBetter/cert.cert" | ||||||
| # gather all running instances | # gather all running instances | ||||||
| OLDINSTANCES=$(docker container ps --all -f Name=bitwarden --format '{{.ID}}') | OLDINSTANCES=$(docker container ps --all -f Name=bitwarden --format '{{.ID}}') | ||||||
| 
 | 
 | ||||||
| # stop all running instances | # stop and remove all running instances | ||||||
| for INSTANCE in ${OLDINSTANCES[@]}; do | for INSTANCE in ${OLDINSTANCES[@]}; do | ||||||
| 	docker stop $INSTANCE | 	docker stop $INSTANCE | ||||||
| 	docker rm $INSTANCE | 	docker rm $INSTANCE | ||||||
|  | @ -58,10 +58,10 @@ else | ||||||
| 	fi | 	fi | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| # stop and remove previous existing patch(ed) container | # remove previous existing patch(ed) image | ||||||
| docker stop bitwarden-patch | if [ "$(docker image ls -q bitwarden-patch)" ]; then | ||||||
| docker rm bitwarden-patch | 	docker image rm bitwarden-patch | ||||||
| docker image rm bitwarden-patch | fi | ||||||
| 
 | 
 | ||||||
| # 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) | ||||||
|  |  | ||||||
|  | @ -41,7 +41,7 @@ internal class Program | ||||||
| 
 | 
 | ||||||
|             Console.WriteLine($"New Cert Thumbprint: {certificate.Thumbprint}"); |             Console.WriteLine($"New Cert Thumbprint: {certificate.Thumbprint}"); | ||||||
| 
 | 
 | ||||||
|             IEnumerable<TypeDef> services = moduleDefMd.Types.Where(t => t.Namespace == "Bit.Core.Services"); |             IEnumerable<TypeDef> services = moduleDefMd.Types.Where(t => t.Namespace == "Bit.Core.Billing.Services"); | ||||||
|             TypeDef type = services.First(t => t.Name == "LicensingService"); |             TypeDef type = services.First(t => t.Name == "LicensingService"); | ||||||
|             MethodDef constructor = type.FindConstructors().First(); |             MethodDef constructor = type.FindConstructors().First(); | ||||||
|              |              | ||||||
|  |  | ||||||
|  | @ -12,4 +12,4 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| COPY --from=build /app . | COPY --from=build /app . | ||||||
| 
 | 
 | ||||||
| ENTRYPOINT [ "dotnet", "/app/licenseGen.dll", "--core", "/app/Core.dll", "--executable", "/app/Api", "--cert", "/app/cert.pfx" ] | ENTRYPOINT [ "dotnet", "/app/licenseGen.dll", "--core", "/app/Core.dll", "--cert", "/app/cert.pfx" ] | ||||||
|  | @ -360,7 +360,7 @@ internal class Program | ||||||
|     { |     { | ||||||
|         Assembly core = AssemblyLoadContext.Default.LoadFromAssemblyPath(corePath); |         Assembly core = AssemblyLoadContext.Default.LoadFromAssemblyPath(corePath); | ||||||
| 
 | 
 | ||||||
|         Type type = core.GetType("Bit.Core.Models.Business.UserLicense"); |         Type type = core.GetType("Bit.Core.Billing.Models.Business.UserLicense"); | ||||||
|         Type licenseTypeEnum = core.GetType("Bit.Core.Enums.LicenseType"); |         Type licenseTypeEnum = core.GetType("Bit.Core.Enums.LicenseType"); | ||||||
| 
 | 
 | ||||||
|         Object license = Activator.CreateInstance(type); |         Object license = Activator.CreateInstance(type); | ||||||
|  | @ -393,7 +393,7 @@ internal class Program | ||||||
|     { |     { | ||||||
|         Assembly core = AssemblyLoadContext.Default.LoadFromAssemblyPath(corePath); |         Assembly core = AssemblyLoadContext.Default.LoadFromAssemblyPath(corePath); | ||||||
| 
 | 
 | ||||||
|         Type type = core.GetType("Bit.Core.Models.Business.OrganizationLicense"); |         Type type = core.GetType("Bit.Core.Billing.Models.Business.OrganizationLicense"); | ||||||
|         Type licenseTypeEnum = core.GetType("Bit.Core.Enums.LicenseType"); |         Type licenseTypeEnum = core.GetType("Bit.Core.Enums.LicenseType"); | ||||||
|         Type planTypeEnum = core.GetType("Bit.Core.Billing.Enums.PlanType"); |         Type planTypeEnum = core.GetType("Bit.Core.Billing.Enums.PlanType"); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user