@@ -63,6 +63,11 @@ public partial class BuildScript : DefaultBuildScript
6363 /// </summary>
6464 protected FullPath TestDir => RootDirectory . CombineWith ( "tests" ) ;
6565
66+ /// <summary>
67+ /// 性能测试目录
68+ /// </summary>
69+ protected FullPath BenchmarkDir => RootDirectory . CombineWith ( "benchmarks" ) ;
70+
6671 /// <summary>
6772 /// 输出目录
6873 /// </summary>
@@ -88,6 +93,11 @@ public partial class BuildScript : DefaultBuildScript
8893 /// </summary>
8994 protected List < FileFullPath > IgnoreTestProjectFiles { get ; set ; }
9095
96+ /// <summary>
97+ /// 忽略性能测试项目文件列表
98+ /// </summary>
99+ protected List < FileFullPath > IgnoreBenchmarkProjectFiles { get ; set ; }
100+
91101 /// <summary>
92102 /// 忽略打包项目文件列表
93103 /// </summary>
@@ -115,10 +125,11 @@ private List<FileFullPath> GetPackProjects()
115125 /// <param name="context">构建任务上下文</param>
116126 protected override void BeforeBuildExecution ( ITaskContext context )
117127 {
118- BuildVersion = FetchBuildVersion ( context ) ;
128+ // BuildVersion = FetchBuildVersion(context);// 默认值不会变更
119129 ProjectFiles = context . GetFiles ( SourceDir , "*/*.csproj" ) ;
120130 UnitTestProjectFiles = context . GetFiles ( TestDir , "*/*.csproj" ) ;
121131 IntegrationTestProjectFiles = context . GetFiles ( TestDir , "*/*.Tests.Integration.csproj" ) ;
132+ IgnoreBenchmarkProjectFiles = context . GetFiles ( BenchmarkDir , "*/*.Benchmark.csproj" ) ;
122133 IgnoreTestProjectFiles = new List < FileFullPath > ( ) ;
123134 IgnorePackProjectFiles = new List < FileFullPath > ( ) ;
124135 AddIgnoreTestProjects ( context ) ;
@@ -149,6 +160,8 @@ private void AddIgnorePackProjects(ITaskContext context)
149160 /// </summary>
150161 protected override void ConfigureTargets ( ITaskContext context )
151162 {
163+ context . LogInfo ( $ "当前环境值: { Env } ") ;
164+ BuildVersion = FetchBuildVersion ( context ) ;
152165 var clean = Clean ( context ) ;
153166 var restore = Restore ( context , clean ) ;
154167 var build = Build ( context , restore ) ;
0 commit comments