2

我在 Windows Server 2003 操作系统上运行 ccnet 服务器。我的产品的构建运行良好。但标签始终保持“1.0.1.0”。如果我通过 Web 仪表板进行强制构建,则版本会增加,否则,版本不会增加。

任何人都可以告诉我是否有我遗漏的东西。这是一个已知问题吗?有解决方法吗?

产品的巡航控制配置文件 (project_config.xml) 如下所示:

<cb:config-template xmlns:cb="urn:ccnet.config.builder">

  <project name="MyProduct">
    <workingDirectory>$(MyProductRootDir)</workingDirectory>
    <artifactDirectory>$(MyProductRootDir)\build</artifactDirectory>
    <webURL>http://local/ccnet/server/local/project/MyProduct/ViewProjectReport.aspx</webURL>
    <modificationDelaySeconds>900</modificationDelaySeconds>
    <sourcecontrol type="clearCase">
      <viewPath>$(MyProductRootDir)</viewPath>
      <branch>main</branch>
      <autoGetSource>true</autoGetSource>
      <useLabel>false</useLabel>
    </sourcecontrol>
    <triggers>
      <scheduleTrigger time="06:00" name="6AM_build">
        <weekDays>
          <weekDay>Monday</weekDay>
          <weekDay>Tuesday</weekDay>
          <weekDay>Wednesday</weekDay>
          <weekDay>Thursday</weekDay>
          <weekDay>Friday</weekDay>
        </weekDays>
      </scheduleTrigger>
      <scheduleTrigger time="09:00" name="9AM_build">
        <weekDays>
          <weekDay>Monday</weekDay>
          <weekDay>Tuesday</weekDay>
          <weekDay>Wednesday</weekDay>
          <weekDay>Thursday</weekDay>
          <weekDay>Friday</weekDay>
        </weekDays>
      </scheduleTrigger>
      <scheduleTrigger time="12:00" name="12PM_build">
        <weekDays>
          <weekDay>Monday</weekDay>
          <weekDay>Tuesday</weekDay>
          <weekDay>Wednesday</weekDay>
          <weekDay>Thursday</weekDay>
          <weekDay>Friday</weekDay>
        </weekDays>
      </scheduleTrigger>
      <scheduleTrigger time="15:00" name="3PM_build">
        <weekDays>
          <weekDay>Monday</weekDay>
          <weekDay>Tuesday</weekDay>
          <weekDay>Wednesday</weekDay>
          <weekDay>Thursday</weekDay>
          <weekDay>Friday</weekDay>
        </weekDays>
      </scheduleTrigger>
      <scheduleTrigger time="18:00" name="6PM_build">
        <weekDays>
          <weekDay>Monday</weekDay>
          <weekDay>Tuesday</weekDay>
          <weekDay>Wednesday</weekDay>
          <weekDay>Thursday</weekDay>
          <weekDay>Friday</weekDay>
        </weekDays>
      </scheduleTrigger>
    </triggers>
    <labeller type="assemblyVersionLabeller">
      <major>1</major>
      <minor>0</minor>
      <incrementOnFailure>true</incrementOnFailure>
    </labeller>
    <tasks>
      <msbuild>
        <executable>$(msbuildexe)</executable>
        <workingDirectory>build</workingDirectory>
        <projectFile>build.targets</projectFile>
        <buildArgs>/p:Configuration=Debug /fileLoggerParameters:LogFile=build_log.txt</buildArgs>
        <targets>Build</targets>
        <timeout>1200</timeout>
        <logger>FileLogger,Microsoft.Build.Engine</logger>
      </msbuild>
    </tasks>
    <publishers>
      <xmllogger logDir="E:\ccnet\logs\MyProduct" />
      <statistics />
    </publishers>

    <externalLinks>
      <externalLink name="build_output" url="http://local/builds/MyProduct" />
    </externalLinks>

  </project>
</cb:config-template>

我的 ccnet.config 文件看起来像这样

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">

  <cb:define msbuildexe="C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe"/>

  <cb:define cyraftframeworkrootdir="E:\myProduct"/>
  <cb:include href="project_config.xml" xmlns:cb="urn:ccnet.config.builder"/>

</cruisecontrol> 
4

1 回答 1

3

这是因为程序集版本标签器中的错误仅在构建条件为“ForceBuild”时才会增加。因此,如果由于修改源代码而触发了构建,在这种情况下,触发器的构建条件将是“IfModificationExists”,版本号不会增加。

这已得到修复。该错误的详细信息在这里:

http://jira.public.thoughtworks.org/browse/CCNET-1762

于 2010-02-03T18:07:25.657 回答