diff --git a/build.ps1 b/build.ps1 index 5e80bec..1d04b8f 100644 --- a/build.ps1 +++ b/build.ps1 @@ -28,9 +28,8 @@ if (!(Test-Path "$pwd\.keys")) { .\generateKeys.ps1 } -# copy the key to bitBetter and licenseGen +# copy the key to bitBetter Copy-Item "$pwd\.keys\cert.cert" -Destination "$pwd\src\bitBetter" -Copy-Item "$pwd\.keys\cert.pfx" -Destination "$pwd\src\licenseGen" # build bitBetter and clean the source directory after docker build --no-cache -t bitbetter/bitbetter "$pwd\src\bitBetter" @@ -82,12 +81,6 @@ docker build . --tag bitwarden-patch --file "$pwd\src\bitBetter\Dockerfile-bitwa docker stop bitwarden-patch docker rm bitwarden-patch -# copy our patched library to the licenseGen source directory -Copy-Item "$tempdirectory\Identity\Core.dll" -Destination "$pwd\src\licenseGen" - -# remove our temporary directory -Remove-Item "$tempdirectory" -Recurse -Force - # start all user requested instances if (Test-Path -Path "$pwd\.servers\serverlist.txt" -PathType Leaf) { foreach($line in Get-Content "$pwd\.servers\serverlist.txt") { @@ -100,9 +93,16 @@ if (Test-Path -Path "$pwd\.servers\serverlist.txt" -PathType Leaf) { # remove our bitBetter image docker image rm bitbetter/bitbetter +# copy our patched library to the licenseGen source directory +Copy-Item "$tempdirectory\Identity\Core.dll" -Destination "$pwd\src\licenseGen" +Copy-Item "$pwd\.keys\cert.pfx" -Destination "$pwd\src\licenseGen" + # build the licenseGen docker build -t bitbetter/licensegen "$pwd\src\licenseGen" # clean the licenseGen source directory Remove-Item "$pwd\src\licenseGen\Core.dll" -Force Remove-Item "$pwd\src\licenseGen\cert.pfx" -Force + +# remove our temporary directory +Remove-Item "$tempdirectory" -Recurse -Force \ No newline at end of file diff --git a/build.sh b/build.sh index 8775cc4..1b4fd4b 100755 --- a/build.sh +++ b/build.sh @@ -29,9 +29,8 @@ if [ ! -d "$PWD/.keys" ]; then ./generateKeys.sh fi -# copy the key to bitBetter and licenseGen +# copy the key to bitBetter cp -f "$PWD/.keys/cert.cert" "$PWD/src/bitBetter" -cp -f "$PWD/.keys/cert.pfx" "$PWD/src/licenseGen" # build bitBetter and clean the source directory after docker build --no-cache -t bitbetter/bitbetter "$PWD/src/bitBetter" @@ -85,12 +84,6 @@ docker build . --tag bitwarden-patch --file "$PWD/src/bitBetter/Dockerfile-bitwa docker stop bitwarden-patch docker rm bitwarden-patch -# copy our patched library to the licenseGen source directory -cp -f "$TEMPDIRECTORY/Identity/Core.dll" "$PWD/src/licenseGen" - -# remove our temporary directory -rm -rf "$TEMPDIRECTORY" - # start all user requested instances if [ -f "$PWD/src/bitBetter/cert.cert" ]; then sed -i 's/\r$//' "$PWD/.servers/serverlist.txt" @@ -104,9 +97,16 @@ fi # remove our bitBetter image docker image rm bitbetter/bitbetter +# copy our patched library to the licenseGen source directory +cp -f "$TEMPDIRECTORY/Identity/Core.dll" "$PWD/src/licenseGen" +cp -f "$PWD/.keys/cert.pfx" "$PWD/src/licenseGen" + # build the licenseGen docker build -t bitbetter/licensegen "$PWD/src/licenseGen" # clean the licenseGen source directory rm -f "$PWD/src/licenseGen/Core.dll" rm -f "$PWD/src/licenseGen/cert.pfx" + +# remove our temporary directory +rm -rf "$TEMPDIRECTORY" \ No newline at end of file