[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
This commit is contained in:
+3
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user