diff --git a/Directory.Build.props b/Directory.Build.props index 72fe2fc7af..152b451825 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -52,4 +52,21 @@ 4.18.1 + + + + + + + + + + <_Parameter1>GitHash + <_Parameter2>$(SourceRevisionId) + + + diff --git a/bitwarden_license/src/Sso/Dockerfile b/bitwarden_license/src/Sso/Dockerfile index bb77d5526d..ab9384d7d2 100644 --- a/bitwarden_license/src/Sso/Dockerfile +++ b/bitwarden_license/src/Sso/Dockerfile @@ -31,7 +31,6 @@ RUN . /tmp/rid.txt && dotnet publish \ --no-restore \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/src/Admin/Dockerfile b/src/Admin/Dockerfile index b1a3d772c0..cf839e56a9 100644 --- a/src/Admin/Dockerfile +++ b/src/Admin/Dockerfile @@ -2,7 +2,6 @@ # Build stage # ############################################### FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG GIT_COMMIT # Docker buildx supplies the value for this arg ARG TARGETPLATFORM @@ -39,7 +38,6 @@ RUN npm run build RUN . /tmp/rid.txt && dotnet publish \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/src/Api/Dockerfile b/src/Api/Dockerfile index f5327a37f4..a37c0ae8d4 100644 --- a/src/Api/Dockerfile +++ b/src/Api/Dockerfile @@ -2,7 +2,6 @@ # Build stage # ############################################### FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG GIT_COMMIT # Docker buildx supplies the value for this arg ARG TARGETPLATFORM @@ -32,7 +31,6 @@ RUN . /tmp/rid.txt && dotnet publish \ --no-restore \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/src/Billing/Dockerfile b/src/Billing/Dockerfile index 3a6b8aac48..50059cfcbd 100644 --- a/src/Billing/Dockerfile +++ b/src/Billing/Dockerfile @@ -2,7 +2,6 @@ # Build stage # ############################################### FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG GIT_COMMIT # Docker buildx supplies the value for this arg ARG TARGETPLATFORM @@ -32,7 +31,6 @@ RUN . /tmp/rid.txt && dotnet publish \ --no-restore \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/src/Events/Dockerfile b/src/Events/Dockerfile index 708e96019f..490a862ebf 100644 --- a/src/Events/Dockerfile +++ b/src/Events/Dockerfile @@ -2,7 +2,6 @@ # Build stage # ############################################### FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG GIT_COMMIT # Docker buildx supplies the value for this arg ARG TARGETPLATFORM @@ -32,7 +31,6 @@ RUN . /tmp/rid.txt && dotnet publish \ --no-restore \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/src/EventsProcessor/Dockerfile b/src/EventsProcessor/Dockerfile index 66cbd0e621..89ba4c3137 100644 --- a/src/EventsProcessor/Dockerfile +++ b/src/EventsProcessor/Dockerfile @@ -2,7 +2,6 @@ # Build stage # ############################################### FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG GIT_COMMIT # Docker buildx supplies the value for this arg ARG TARGETPLATFORM @@ -32,7 +31,6 @@ RUN . /tmp/rid.txt && dotnet publish \ --no-restore \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/src/Icons/Dockerfile b/src/Icons/Dockerfile index 786d30af56..5f7c4e8e8e 100644 --- a/src/Icons/Dockerfile +++ b/src/Icons/Dockerfile @@ -2,7 +2,6 @@ # Build stage # ############################################### FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG GIT_COMMIT # Docker buildx supplies the value for this arg ARG TARGETPLATFORM @@ -31,7 +30,6 @@ RUN . /tmp/rid.txt && dotnet publish \ --no-restore \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/src/Identity/Dockerfile b/src/Identity/Dockerfile index 5c2a8e4064..dd81a05f33 100644 --- a/src/Identity/Dockerfile +++ b/src/Identity/Dockerfile @@ -2,7 +2,6 @@ # Build stage # ############################################### FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG GIT_COMMIT # Docker buildx supplies the value for this arg ARG TARGETPLATFORM @@ -32,7 +31,6 @@ RUN . /tmp/rid.txt && dotnet publish \ --no-restore \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/src/Notifications/Dockerfile b/src/Notifications/Dockerfile index bdf9373f48..2d7aa34069 100644 --- a/src/Notifications/Dockerfile +++ b/src/Notifications/Dockerfile @@ -2,7 +2,6 @@ # Build stage # ############################################### FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG GIT_COMMIT # Docker buildx supplies the value for this arg ARG TARGETPLATFORM @@ -32,7 +31,6 @@ RUN . /tmp/rid.txt && dotnet publish \ --no-restore \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/util/Attachments/Dockerfile b/util/Attachments/Dockerfile index 47b8660d9e..efaf5bd50c 100644 --- a/util/Attachments/Dockerfile +++ b/util/Attachments/Dockerfile @@ -30,7 +30,6 @@ WORKDIR /source/util/Server RUN . /tmp/rid.txt && dotnet publish \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/util/MsSqlMigratorUtility/Dockerfile b/util/MsSqlMigratorUtility/Dockerfile index eab9bf8b65..9d0c878199 100644 --- a/util/MsSqlMigratorUtility/Dockerfile +++ b/util/MsSqlMigratorUtility/Dockerfile @@ -2,7 +2,6 @@ # Build stage # ############################################### FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG GIT_COMMIT # Docker buildx supplies the value for this arg ARG TARGETPLATFORM @@ -46,7 +45,6 @@ WORKDIR /source/util/MsSqlMigratorUtility RUN . /tmp/rid.txt && dotnet publish \ --self-contained \ /p:PublishSingleFile=true \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out diff --git a/util/Setup/Dockerfile b/util/Setup/Dockerfile index eafae1b1bd..f36a329019 100644 --- a/util/Setup/Dockerfile +++ b/util/Setup/Dockerfile @@ -2,7 +2,6 @@ # Build stage # ############################################### FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG GIT_COMMIT # Docker buildx supplies the value for this arg ARG TARGETPLATFORM @@ -32,7 +31,6 @@ RUN . /tmp/rid.txt && dotnet publish \ -c release \ --no-restore \ --self-contained \ - /p:SourceRevisionId="$GIT_COMMIT" \ -r $RID \ -o out