From b1f83aa7ab9c6990fc90e832ba1ee3696a552df4 Mon Sep 17 00:00:00 2001 From: Alessio Dal Santo Date: Tue, 17 Feb 2026 14:32:05 +0100 Subject: [PATCH] [Fix] Corretto sistema di versioning per container Docker - Disabilitato target MSBuild GenerateVersionJson durante build CI/CD - Aggiunta condizione: non esegue se ContinuousIntegrationBuild=true - Aggiornato Dockerfile per usare /p:ContinuousIntegrationBuild=true - Previene sovrascrittura del version.json generato dal workflow Gitea - Risolve problema: container mostra v1.0.0-dev invece della versione da git tag --- Data_Coupler/Data_Coupler.csproj | 6 ++++-- Dockerfile | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Data_Coupler/Data_Coupler.csproj b/Data_Coupler/Data_Coupler.csproj index ae2c9f2..afd4219 100644 --- a/Data_Coupler/Data_Coupler.csproj +++ b/Data_Coupler/Data_Coupler.csproj @@ -43,7 +43,9 @@ - + + @@ -82,7 +84,7 @@ - + diff --git a/Dockerfile b/Dockerfile index 0ec7f35..6534981 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,14 +20,15 @@ COPY . . # Build del progetto principale WORKDIR "/src/Data_Coupler" -RUN dotnet build "Data_Coupler.csproj" -c Release -o /app/build +RUN dotnet build "Data_Coupler.csproj" -c Release -o /app/build /p:ContinuousIntegrationBuild=true # Stage 2: Publish FROM build AS publish RUN dotnet publish "Data_Coupler.csproj" -c Release -o /app/publish \ /p:SelfContained=false \ /p:PublishTrimmed=false \ - /p:PublishSingleFile=false + /p:PublishSingleFile=false \ + /p:ContinuousIntegrationBuild=true # Stage 3: Runtime FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final