mirror of
https://github.com/jakeswenson/BitBetter.git
synced 2025-12-17 19:56:18 +00:00
Improve build and scripts (#30)
* Use absolute path rather than relative path in scripts * Remove src/bitBetter/.keys/cert.cert * Build licenseGen in Docker This way we don't have to install dotnet sdk on the host * Build bitBetter in Docker This way we don't have to install dotnet sdk on the host * Change DIR in run.sh to point to the project root * Replace echo in Dockerfiles by set -x and set -e * Use same Dockerfile for api and identity images * Update README.md * Update CircleCI config The Docker Executor can't mount volume. https://support.circleci.com/hc/en-us/articles/360007324514 https://circleci.com/docs/2.0/executor-types/#using-machine * Make scripts work with sh * Remove the container used to build bitBetter
This commit is contained in:
Binary file not shown.
11
src/bitBetter/Dockerfile
Normal file
11
src/bitBetter/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
ARG BITWARDEN_TAG
|
||||
FROM ${BITWARDEN_TAG}
|
||||
|
||||
COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/
|
||||
COPY ./.keys/cert.cert /newLicensing.cer
|
||||
|
||||
RUN set -e; set -x; \
|
||||
dotnet /bitBetter/bitBetter.dll && \
|
||||
mv /app/Core.dll /app/Core.orig.dll && \
|
||||
mv /app/modified.dll /app/Core.dll && \
|
||||
rm -rf /bitBetter && rm -rf /newLicensing.cer
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM bitwarden/api
|
||||
|
||||
COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/
|
||||
COPY ./.keys/cert.cert /newLicensing.cer
|
||||
|
||||
RUN dotnet /bitBetter/bitBetter.dll && \
|
||||
echo "modified dll" && \
|
||||
mv /app/Core.dll /app/Core.orig.dll && \
|
||||
mv /app/modified.dll /app/Core.dll && \
|
||||
echo "replaced dll" && \
|
||||
rm -rf /bitBetter && rm -rf /newLicensing.cer && \
|
||||
echo "cleaned up"
|
||||
8
src/bitBetter/build.sh
Executable file
8
src/bitBetter/build.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
dotnet add package Newtonsoft.Json --version 12.0.1
|
||||
dotnet restore
|
||||
dotnet publish
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM bitwarden/identity
|
||||
|
||||
COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/
|
||||
COPY ./.keys/cert.cert /newLicensing.cer
|
||||
|
||||
RUN dotnet /bitBetter/bitBetter.dll && \
|
||||
echo "modified dll" && \
|
||||
mv /app/Core.dll /app/Core.orig.dll && \
|
||||
mv /app/modified.dll /app/Core.dll && \
|
||||
echo "replaced dll" && \
|
||||
rm -rf /bitBetter && rm -rf /newLicensing.cer && \
|
||||
echo "cleaned up"
|
||||
Reference in New Issue
Block a user