mirror of
https://github.com/bitwarden/server.git
synced 2025-05-21 19:44:32 -05:00
build: update migrator to use simpler build; apply consistent spacing
This commit is contained in:
parent
8e399b8396
commit
6d9739f1cb
@ -9,37 +9,22 @@ ARG TARGETPLATFORM
|
|||||||
# Determine proper runtime value for .NET
|
# Determine proper runtime value for .NET
|
||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-x64 ; \
|
RID=linux-x64 ; \
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-arm64 ; \
|
RID=linux-arm64 ; \
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-arm ; \
|
RID=linux-arm ; \
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
# Copy csproj files as distinct layers
|
# Copy required project files
|
||||||
WORKDIR /source
|
WORKDIR /source
|
||||||
COPY util/MsSqlMigratorUtility/*.csproj ./util/MsSqlMigratorUtility/
|
COPY . ./
|
||||||
COPY src/Core/*.csproj ./src/Core/
|
|
||||||
COPY util/Migrator/*.csproj ./util/Migrator/
|
|
||||||
COPY util/Server/*.csproj ./util/Server/
|
|
||||||
COPY util/Server/Properties/*.csproj ./util/Server/Properties/
|
|
||||||
COPY util/Server/Properties/launchSettings.json ./util/Server/Properties/
|
|
||||||
COPY Directory.Build.props .
|
|
||||||
|
|
||||||
# Restore project dependencies and tools
|
# Restore project dependencies and tools
|
||||||
WORKDIR /source/util/MsSqlMigratorUtility
|
WORKDIR /source/util/MsSqlMigratorUtility
|
||||||
RUN . /tmp/rid.txt && dotnet restore -r $RID
|
RUN . /tmp/rid.txt && dotnet restore -r $RID
|
||||||
|
|
||||||
# Copy required project files
|
|
||||||
WORKDIR /source
|
|
||||||
COPY util/MsSqlMigratorUtility/. ./util/MsSqlMigratorUtility/
|
|
||||||
COPY src/Core/. ./src/Core/
|
|
||||||
COPY util/Migrator/. ./util/Migrator/
|
|
||||||
COPY util/Server/. ./util/Server/
|
|
||||||
COPY .git/. ./.git/
|
|
||||||
COPY .editorconfig /source
|
|
||||||
|
|
||||||
# Build project
|
# Build project
|
||||||
WORKDIR /source/util/MsSqlMigratorUtility
|
WORKDIR /source/util/MsSqlMigratorUtility
|
||||||
RUN . /tmp/rid.txt && dotnet publish \
|
RUN . /tmp/rid.txt && dotnet publish \
|
||||||
@ -50,8 +35,6 @@ RUN . /tmp/rid.txt && dotnet publish \
|
|||||||
-r $RID \
|
-r $RID \
|
||||||
-o out
|
-o out
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
###############################################
|
###############################################
|
||||||
# App stage #
|
# App stage #
|
||||||
###############################################
|
###############################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user