Aggiornamento main #12

Merged
Alessio merged 25 commits from staging into main 2026-03-20 17:20:29 +01:00
2 changed files with 7 additions and 4 deletions
Showing only changes of commit b1f83aa7ab - Show all commits
+4 -2
View File
@@ -43,7 +43,9 @@
</ItemGroup>
<!-- Target per generare automaticamente version.json prima del build -->
<Target Name="GenerateVersionJson" BeforeTargets="BeforeBuild;BeforeRebuild">
<!-- SOLO per sviluppo locale, NON in CI/CD (il workflow lo genera prima del Docker build) -->
<Target Name="GenerateVersionJson" BeforeTargets="BeforeBuild;BeforeRebuild"
Condition="'$(ContinuousIntegrationBuild)' != 'true' AND '$(SkipVersionGeneration)' != 'true'">
<!-- Esegui git per ottenere il tag più recente e informazioni commit -->
<Exec Command="git describe --tags --abbrev=0 2>nul" ConsoleToMSBuild="true" IgnoreExitCode="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GitLatestTag" />
@@ -82,7 +84,7 @@
<!-- Scrivi il file version.json -->
<WriteLinesToFile File="wwwroot\version.json" Lines="$(FinalVersionJsonContent)" Overwrite="true" />
<Message Text="Generated version.json with version $(ActualVersion) from git tag" Importance="high" />
<Message Text="Generated version.json with version $(ActualVersion) from git tag (local dev build)" Importance="high" />
</Target>
</Project>
+3 -2
View File
@@ -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