File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . IO ;
33using System . Reflection ;
4+ using System . Threading ;
45using GitVersion . Configuration ;
56using GitVersion . Extensions ;
67using GitVersion . Logging ;
@@ -56,8 +57,15 @@ public int Execute(GitVersionOptions gitVersionOptions)
5657
5758 private int RunGitVersionTool ( GitVersionOptions gitVersionOptions )
5859 {
60+ using var mutex = new Mutex ( true , "sdfsdf" , out var acquired ) ;
61+
5962 try
6063 {
64+ if ( ! acquired )
65+ {
66+ mutex . WaitOne ( ) ;
67+ }
68+
6169 var variables = gitVersionCalculateTool . CalculateVersionVariables ( ) ;
6270
6371 var configuration = configProvider . Provide ( overrideConfig : gitVersionOptions . ConfigInfo . OverrideConfig ) ;
@@ -92,6 +100,10 @@ private int RunGitVersionTool(GitVersionOptions gitVersionOptions)
92100 }
93101 return 1 ;
94102 }
103+ finally
104+ {
105+ mutex . ReleaseMutex ( ) ;
106+ }
95107
96108 return 0 ;
97109 }
You can’t perform that action at this time.
0 commit comments