From 3abfed91e108e2cf68417b40b668fb42d9f30311 Mon Sep 17 00:00:00 2001 From: Alessio Dal Santo Date: Tue, 17 Feb 2026 11:20:57 +0100 Subject: [PATCH] [Feature] Implementato sistema di generazione automatica version.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Aggiunto MSBuild target che genera version.json automaticamente prima di ogni build - Versione estratta dal tag git più recente (git describe --tags) - Rimosso version.json dal tracking git (file generato automaticamente) - Aggiornato .gitignore per escludere version.json - Il file viene ora rigenerato ad ogni build con versione, commit SHA, branch e timestamp corretti --- .gitignore | 4 +++ Data_Coupler/Data_Coupler.csproj | 43 +++++++++++++++++++++++++++++++ Data_Coupler/wwwroot/version.json | 7 ----- 3 files changed, 47 insertions(+), 7 deletions(-) delete mode 100644 Data_Coupler/wwwroot/version.json diff --git a/.gitignore b/.gitignore index 676f4a9..fdace1f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,10 @@ # Created by https://www.toptal.com/developers/gitignore/api/csharp,visualstudiocode,visualstudio # Edit at https://www.toptal.com/developers/gitignore?templates=csharp,visualstudiocode,visualstudio +# Data-Coupler specific +# Version file generato automaticamente durante il build +Data_Coupler/wwwroot/version.json + ### Csharp ### ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. diff --git a/Data_Coupler/Data_Coupler.csproj b/Data_Coupler/Data_Coupler.csproj index 7dce47b..ae2c9f2 100644 --- a/Data_Coupler/Data_Coupler.csproj +++ b/Data_Coupler/Data_Coupler.csproj @@ -42,4 +42,47 @@ + + + + + + + + + + + + + + + + $(GitLatestTag.Substring(1)) + $(GitLatestTag) + 1.0.0-dev + $(GitCommitSha) + unknown + $(GitBranch) + local + + + + + +{ + "version": "$(ActualVersion)", + "commitSha": "$(ActualCommitSha)", + "branch": "$(ActualBranch)", + "buildDate": "$([System.DateTime]::Now.ToString('yyyy-MM-dd HH:mm:ss'))", + "buildEnvironment": "Development" +} + + + + + + + + + diff --git a/Data_Coupler/wwwroot/version.json b/Data_Coupler/wwwroot/version.json deleted file mode 100644 index e4ae4ff..0000000 --- a/Data_Coupler/wwwroot/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": "2.2.0", - "commitSha": "01f7846", - "branch": "development", - "buildDate": "2026-02-02", - "buildEnvironment": "Local" -}