From df90bc665943b7cfb3cfad55292d49392c195494 Mon Sep 17 00:00:00 2001 From: Dmitry Dzygin Date: Wed, 28 Feb 2018 11:55:52 +0100 Subject: [PATCH] #546 Assembly meta data now includes git branch/commit hash --- .gitignore | 4 +++- .../Composite.Workflows.csproj | 20 +++++++++++++++++-- Composite/Composite.csproj | 20 +++++++++++++++++-- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index fb9ec3b3b4..95b556a942 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ - + /.vs /Composite/bin /Composite/obj @@ -36,3 +36,5 @@ /Packages/ selenium-debug.log /Website/test/e2e/reports/ + +GitCommitInfo.cs \ No newline at end of file diff --git a/Composite.Workflows/Composite.Workflows.csproj b/Composite.Workflows/Composite.Workflows.csproj index 618989f212..178935dd0e 100644 --- a/Composite.Workflows/Composite.Workflows.csproj +++ b/Composite.Workflows/Composite.Workflows.csproj @@ -965,6 +965,7 @@ ChangeOwnPasswordWorkflow.cs + @@ -1362,11 +1363,26 @@ + + + $(ProjectDir)git_branch.txt + $(ProjectDir)git_commithash.txt + + + + + $([System.IO.File]::ReadAllText("$(GitBranchFile)").Trim()) + $([System.IO.File]::ReadAllText("$(GitCommitHashFile)").Trim()) + [assembly: System.Reflection.AssemblyInformationalVersion("$(GitBranch). Commit Hash: $(GitCommitHash)")] + + + + + + copy "$(TargetPath)" "$(ProjectDir)..\bin\" copy "$(TargetPath)" "$(ProjectDir)..\Website\bin\" diff --git a/Composite/Composite.csproj b/Composite/Composite.csproj index bdb821f3f8..385e2e52ca 100644 --- a/Composite/Composite.csproj +++ b/Composite/Composite.csproj @@ -253,6 +253,7 @@ + @@ -2667,11 +2668,26 @@ + + + $(ProjectDir)git_branch.txt + $(ProjectDir)git_commithash.txt + + + + + $([System.IO.File]::ReadAllText("$(GitBranchFile)").Trim()) + $([System.IO.File]::ReadAllText("$(GitCommitHashFile)").Trim()) + [assembly: System.Reflection.AssemblyInformationalVersion("$(GitBranch). Commit Hash: $(GitCommitHash)")] + + + + + + copy "$(TargetPath)" "$(ProjectDir)..\bin\" copy "$(TargetPath)" "$(ProjectDir)..\Website\bin\"