1
0
mirror of https://github.com/jakeswenson/BitBetter.git synced 2023-10-10 13:36:57 +02:00

Update .net core and newtonsoft.json

Co-authored-by: Michiel Hazelhof <m.hazelhof@fyn.nl>

Due to compatibility issues laid out in issue #53:

Update from .net core 2.0 to 3.1 and newtonsoft.json 12.0.1 to 12.0.3.
This commit is contained in:
Michiel Hazelhof 2020-03-14 12:00:25 +01:00 committed by GitHub
parent 9c62a6f2ca
commit 006fa1fecf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 14 deletions

View File

@ -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" 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/api -t bitbetter/api "$DIR/src/bitBetter" # --squash
docker build --build-arg BITWARDEN_TAG=bitwarden/identity -t bitbetter/identity "$DIR/src/bitBetter" # --squash docker build --build-arg BITWARDEN_TAG=bitwarden/identity -t bitbetter/identity "$DIR/src/bitBetter" # --squash

View File

@ -1,7 +1,7 @@
ARG BITWARDEN_TAG ARG BITWARDEN_TAG
FROM ${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 COPY ./.keys/cert.cert /newLicensing.cer
RUN set -e; set -x; \ RUN set -e; set -x; \

View File

@ -2,11 +2,12 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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> </ItemGroup>
</Project> </Project>

View File

@ -3,6 +3,6 @@
set -e set -e
set -x set -x
dotnet add package Newtonsoft.Json --version 12.0.1 dotnet add package Newtonsoft.Json --version 12.0.3
dotnet restore dotnet restore
dotnet publish dotnet publish

View File

@ -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 WORKDIR /licenseGen
COPY . /licenseGen COPY . /licenseGen
RUN set -e; set -x; \ 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 restore \
&& dotnet publish && dotnet publish
FROM bitbetter/api 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" ] ENTRYPOINT [ "dotnet", "/app/licenseGen.dll", "--core", "/app/Core.dll", "--cert", "/cert.pfx" ]

View File

@ -38,7 +38,7 @@ namespace bitwardenSelfLicensor
string buff="", licensetype="", name="", email="", businessname=""; string buff="", licensetype="", name="", email="", businessname="";
bool valid_guid = false, valid_installid = false; bool valid_guid = false, valid_installid = false;
Guid guid, installid; Guid guid = new Guid(), installid = new Guid();
config.OnExecute(() => config.OnExecute(() =>
{ {
@ -114,7 +114,6 @@ namespace bitwardenSelfLicensor
if ( checkEmail(buff) ) email = buff; if ( checkEmail(buff) ) email = buff;
} }
if (licensetype == "user") if (licensetype == "user")
{ {
WriteLineOver("Confirm creation of \"user\" license for username: \"" + name + "\", email: \"" + email + "\", User-GUID: \"" + guid + "\"? Y/n"); WriteLineOver("Confirm creation of \"user\" license for username: \"" + name + "\", email: \"" + email + "\", User-GUID: \"" + guid + "\"? Y/n");

View File

@ -2,12 +2,12 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" /> <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" /> <PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
</ItemGroup> </ItemGroup>