mirror of
				https://github.com/jakeswenson/BitBetter.git
				synced 2025-10-31 04:43:25 +00:00 
			
		
		
		
	Fix compatibility with newer versions
This commit is contained in:
		
							parent
							
								
									9c62a6f2ca
								
							
						
					
					
						commit
						150696b542
					
				
							
								
								
									
										2
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								build.sh
									
									
									
									
									
								
							|  | @ -10,7 +10,7 @@ DIR=`exec 2>/dev/null;(cd -- "$DIR") && cd -- "$DIR"|| cd "$DIR"; unset PWD; /us | |||
| 
 | ||||
| cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/.keys" | ||||
| 
 | ||||
| docker run --rm -v "$DIR/src/bitBetter:/bitBetter" -w=/bitBetter mcr.microsoft.com/dotnet/core/sdk:2.1 sh build.sh | ||||
| docker run --rm -v "$DIR/src/bitBetter:/bitBetter" -w=/bitBetter mcr.microsoft.com/dotnet/core/sdk:3.1 sh build.sh | ||||
| 
 | ||||
| docker build --build-arg BITWARDEN_TAG=bitwarden/api -t bitbetter/api "$DIR/src/bitBetter" # --squash | ||||
| docker build --build-arg BITWARDEN_TAG=bitwarden/identity -t bitbetter/identity "$DIR/src/bitBetter" # --squash | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| ARG BITWARDEN_TAG | ||||
| FROM ${BITWARDEN_TAG} | ||||
| 
 | ||||
| COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/ | ||||
| COPY bin/Debug/netcoreapp3.1/publish/* /bitBetter/ | ||||
| COPY ./.keys/cert.cert /newLicensing.cer | ||||
| 
 | ||||
| RUN set -e; set -x; \ | ||||
|  |  | |||
|  | @ -2,11 +2,12 @@ | |||
| 
 | ||||
|   <PropertyGroup> | ||||
|     <OutputType>Exe</OutputType> | ||||
|     <TargetFramework>netcoreapp2.0</TargetFramework> | ||||
|     <TargetFramework>netcoreapp3.1</TargetFramework> | ||||
|   </PropertyGroup> | ||||
| 
 | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="Mono.Cecil" Version="0.10.0-beta6" /> | ||||
|     <PackageReference Include="Mono.Cecil" Version="0.11.2" /> | ||||
|     <PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> | ||||
|   </ItemGroup> | ||||
| 
 | ||||
| </Project> | ||||
|  |  | |||
|  | @ -3,6 +3,6 @@ | |||
| set -e | ||||
| set -x | ||||
| 
 | ||||
| dotnet add package Newtonsoft.Json --version 12.0.1 | ||||
| dotnet add package Newtonsoft.Json --version 12.0.3 | ||||
| dotnet restore | ||||
| dotnet publish | ||||
|  |  | |||
|  | @ -1,17 +1,17 @@ | |||
| FROM mcr.microsoft.com/dotnet/core/sdk:2.1 as build | ||||
| FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as build | ||||
| 
 | ||||
| WORKDIR /licenseGen | ||||
| 
 | ||||
| COPY . /licenseGen | ||||
| 
 | ||||
| RUN set -e; set -x; \ | ||||
| 	dotnet add package Newtonsoft.Json --version 12.0.1 \ | ||||
| 	dotnet add package Newtonsoft.Json --version 12.0.3 \ | ||||
| 	&& dotnet restore \ | ||||
| 	&& dotnet publish | ||||
| 
 | ||||
| 
 | ||||
| FROM bitbetter/api | ||||
| 
 | ||||
| COPY --from=build /licenseGen/bin/Debug/netcoreapp2.0/publish/* /app/ | ||||
| COPY --from=build /licenseGen/bin/Debug/netcoreapp3.1/publish/* /app/ | ||||
| 
 | ||||
| ENTRYPOINT [ "dotnet", "/app/licenseGen.dll", "--core", "/app/Core.dll", "--cert", "/cert.pfx" ] | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ namespace bitwardenSelfLicensor | |||
|                 string buff="", licensetype="", name="", email="", businessname=""; | ||||
| 
 | ||||
|                 bool valid_guid = false, valid_installid = false; | ||||
|                 Guid guid, installid; | ||||
|                 Guid guid = new Guid(), installid = new Guid(); | ||||
| 
 | ||||
|                 config.OnExecute(() => | ||||
|                 { | ||||
|  | @ -104,17 +104,16 @@ namespace bitwardenSelfLicensor | |||
|                     { | ||||
|                         WriteLineOver("Please provide the username this license will be registered to. [username]:"); | ||||
|                         buff = Console.ReadLine(); | ||||
|                         if ( checkUsername(buff) )   name = buff;                    | ||||
|                         if ( checkUsername(buff) )   name = buff; | ||||
|                     } | ||||
| 
 | ||||
|                     while (email == "") | ||||
|                     { | ||||
|                         WriteLineOver("Please provide the email address for the user " + name + ". [email]"); | ||||
|                         buff = Console.ReadLine(); | ||||
|                         if ( checkEmail(buff) )   email = buff;                    | ||||
|                         if ( checkEmail(buff) )   email = buff; | ||||
|                     } | ||||
| 
 | ||||
| 
 | ||||
|                     if (licensetype == "user") | ||||
|                     { | ||||
|                         WriteLineOver("Confirm creation of \"user\" license for username: \"" + name + "\", email: \"" + email + "\", User-GUID: \"" + guid + "\"? Y/n"); | ||||
|  |  | |||
|  | @ -2,12 +2,12 @@ | |||
| 
 | ||||
|   <PropertyGroup> | ||||
|     <OutputType>Exe</OutputType> | ||||
|     <TargetFramework>netcoreapp2.0</TargetFramework> | ||||
|     <TargetFramework>netcoreapp3.1</TargetFramework> | ||||
|   </PropertyGroup> | ||||
| 
 | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" /> | ||||
|     <PackageReference Include="Newtonsoft.Json" Version="12.0.1" /> | ||||
|     <PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> | ||||
|     <PackageReference Include="System.Runtime.Loader" Version="4.3.0" /> | ||||
|   </ItemGroup> | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user