• CC.net&Nant配置文件


    <cruisecontrol xmlns:cb="urn:ccnet.config.builder">
      <!-- This is your CruiseControl.NET Server Configuration file. Add your projects below! -->
    
    
      <project name="StarWood"
               description="StarWood asp.net cruise control">
    
        <triggers>
        <!-- check the source control every X time for changes, 
             and run the tasks if changes are found 
          <intervalTrigger
                   name="continuous"
                   seconds="30"
                   buildCondition="IfModificationExists"
                   initialSeconds="5"/>-->
    
        </triggers>
    
        <sourcecontrol  type="svn" autoGetSource="true">
                         
                <trunkUrl>svn url</trunkUrl>
                <workingDirectory>e:\ccnet</workingDirectory>
                 <!-- <username>luyifeng</username>
                  <password>luyifeng1</password> -->
        </sourcecontrol> 
     
        
        <tasks>
             <!--  <exec>
             
                  <executable>ping.exe</executable>
                  <buildArgs>localhost</buildArgs>
                  <buildTimeoutSeconds>15</buildTimeoutSeconds>
                  <description>Pinging a server</description>
              </exec> -->
    
           <nant>
            <executable>D:\nant-0.92\bin\nant.exe</executable>
            <baseDirectory>E:\ccnet</baseDirectory>
             <nologo>false</nologo>
              <buildFile>default.build</buildFile>
             <!--   <targetList>
              <target>run</target>
              </targetList> -->
           <buildTimeoutSeconds>1200</buildTimeoutSeconds>
          </nant>
        </tasks>
    
      <!--   <publishers>
         <buildpublisher>
             <sourceDir>C:\StarWood.WebSite\_PublishedWebsites</sourceDir>
             <publishDir>e:\ccpublish</publishDir>
             <useLabelSubDirectory>true</useLabelSubDirectory>
           </buildpublisher>
        </publishers> -->
    
      </project>
    
    </cruisecontrol>

    CC.net配置文件,放在cc.net,server目录中。

    <?xml version="1.0"?>
    <project name="NAnt Examples" default="rebuild">
        <target name="*">
            <nant target="${target::get-current-target()}">
                <buildfiles>
                    <include name="startwood.build" />
                    <exclude name="default.build" />
                </buildfiles>
            </nant>
        </target>
    </project>

    default.build文件,放在项目中。

    <project name="Solution Build Example" default="rebuild">
        <property name="configuration" value="release"/>
        <property name="Project.Output" value="c:\StarWood.WebSite"/>
        <property name="Project.Publish" value="c:\Publish"/>
        <target name="clean" description="Delete all previously compiled binaries.">
            <delete>
                <fileset>
                    <include name="**/bin/**" />
                    <include name="**/obj/**" />
                    <include name="**/*.suo" />
                    <include name="**/*.user" />
                </fileset>
            </delete>
        </target>
        
        <target name="build" description="Build StarWood Startring.">
            <call target="build.StarWood"/>
        </target>
        
        <target name="rebuild" depends="clean, build" />
    
        <target name="build.StarWood">
            <solution configuration="${configuration}" solutionfile="Cendyn.StarWood.sln" outputdir="${Project.Output}">
            <excludeprojects>
            <include name="Cendyn.StarWood.Test\Cendyn.StarWood.Test.csproj" />
             </excludeprojects>
            </solution>
    
             <move todir="${Project.Publish}">
                <fileset basedir="${Project.Output}/_PublishedWebsites/Cendyn.StarWood.WebSite">
                   <exclude name="Web.config" />
                   <excludes name="_config/**" />
    </fileset> </move> <!-- <property name="expected.output" value="bin/${configuration}/WinForms.exe"/> <fail unless="${file::exists(expected.output)}">Output file doesn't exist in ${expected.output}</fail>--> </target> </project>

    具体项目的配置文件,与default.build同级目录存放

  • 相关阅读:
    中国建设银行接口使用详细说明
    Web Service入门
    支付宝及时到帐接口使用详解深入版
    C#仿QQ皮肤-ComboBox 控件实现
    SQl 2005 For XMl 简单查询(Raw,Auto,Path模式)(2)
    GridView 使用方法总结 (二)
    小谈c#数据库存取图片的方式
    SQl 2005 For XMl 简单查询(Raw,Auto,Path模式)(1)
    GridView 使用方法总结 (一)
    C# UDP 入门
  • 原文地址:https://www.cnblogs.com/mz121star/p/ccnet_nant.html
Copyright © 2020-2023  润新知