File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/PostSharp.Engineering.BuildTools/ContinuousIntegration/Triggers Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 22
33using JetBrains . Annotations ;
44using PostSharp . Engineering . BuildTools . ContinuousIntegration . TeamCity . Arguments ;
5+ using System ;
56using System . IO ;
67
78namespace PostSharp . Engineering . BuildTools . ContinuousIntegration . Triggers ;
@@ -17,6 +18,8 @@ public class SourceBuildTrigger : IBuildTrigger
1718 public string ? BranchFilter { get ; init ; }
1819
1920 public BuildConfigurationParameter [ ] ? Parameters { get ; init ; }
21+
22+ public TimeSpan ? QuietPeriod { get ; init ; } = TimeSpan . FromHours ( 2 ) ;
2023
2124 public void GenerateTeamcityCode ( TextWriter writer , string ? branchFilter = null )
2225 {
@@ -33,6 +36,12 @@ void WriteIndented( string text )
3336 branchFilter = this . BranchFilter ?? branchFilter ?? "+:<default>" ;
3437 WriteIndented ( $ "branchFilter = \" { branchFilter } \" " ) ;
3538
39+ if ( this . QuietPeriod != null )
40+ {
41+ WriteIndented ( " quietPeriodMode = VcsTrigger.QuietPeriodMode.USE_CUSTOM" ) ;
42+ WriteIndented ( $ " quietPeriod = { this . QuietPeriod . Value . TotalSeconds } " ) ;
43+ }
44+
3645 WriteIndented ( "// Build will not trigger automatically if the commit message contains comment value." ) ;
3746 WriteIndented ( "triggerRules = \" -:comment=<<VERSION_BUMP>>|<<DEPENDENCIES_UPDATED>>:**\" " ) ;
3847
@@ -51,4 +60,4 @@ void WriteIndented( string text )
5160
5261 writer . WriteLine ( " }" ) ;
5362 }
54- }
63+ }
You can’t perform that action at this time.
0 commit comments