Tags down


Use SVN Revision to label build in CCNET

By : Johannes
Date : July 26 2020, 09:00 PM
Does that help CruiseControl.Net 1.4.4 has now an Assembly Version Labeller, which generates version numbers compatible with .Net assembly properties.
In my project I have it configured as:
code :
<labeller type="assemblyVersionLabeller" incrementOnFailure="true" major="1" minor="2"/>
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<Target Name="BeforeBuild">
  <AssemblyInfo Condition="'$(CCNetLabel)' != ''" CodeLanguage="CS" OutputFile="Properties\AssemblyInfo.cs" 
  AssemblyTitle="MyTitle" AssemblyCompany="MyCompany" AssemblyProduct="MyProduct"
  AssemblyCopyright="Copyright ©  2009" ComVisible="false" Guid="some-random-guid"
  AssemblyVersion="$(CCNetLabel)" AssemblyFileVersion="$(CCNetLabel)"/>
<target name="setversion" description="Sets the version number to CruiseControl.Net label.">
    <script language="C#">
            <include name="System.dll" />
            <import namespace="System.Text.RegularExpressions" />
             public class SetVersionTask : Task
              protected override void ExecuteTask()
               StreamReader reader = new StreamReader(Project.Properties["filename"]);
               string contents = reader.ReadToEnd();
               string replacement = "[assembly: AssemblyVersion(\"" + Project.Properties["CCNetLabel"] + "\")]";
               string newText = Regex.Replace(contents, @"\[assembly: AssemblyVersion\("".*""\)\]", replacement);
               StreamWriter writer = new StreamWriter(Project.Properties["filename"], false);
    <foreach item="File" property="filename">
            <items basedir="..">
                <include name="**\AssemblyInfo.cs"></include>
            <setversion-task />

Share : facebook icon twitter icon

CCNet: How Do I copy the svn revision number to a file in MSBuild?

By : enter the Matrix
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , Does anyboy know how to pass the LastChangeNumber parameter into MSBuild? , Well, I found ONE way to do it:
code :
<Exec Command=">$(DeployDir)label.txt echo subversion $(CCNetLabel)" />
<labeller type="assemblyVersionLabeller">

CCNET - build task required? Multiple repositories, one CCNET source section per project

By : user2941074
Date : March 29 2020, 07:55 AM
I wish this helpful for you
There's no need to have an "actual build" in your project - it could consist of any type of tasks inside the tasks element. I have a couple of projects which only copy the files from the repository to an FTP server after deleting some files which shouldn't be published.

ccnet Not triggering build when changes are committed to svn

By : user3762497
Date : March 29 2020, 07:55 AM
it should still fix some issue We had a similar problem when our subversion and build server's clocks got out of sync by more than 10 mins. Worth checking to eliminate it as a potential problem.

Updating CCNET Last Build Label from an assembly version

By : user4040012
Date : March 29 2020, 07:55 AM
around this issue None of the built-in labellers does what you need, but you should probably be able to write your own custom labeller to that.
You can find two custom labellers with source code here and here to get you started.

ccnet sourcecontrol: get updates from svn 1 revision at a time

By : Anupreet kaur
Date : March 29 2020, 07:55 AM
I hope this helps . Look at using the External source control task in the ccnet config file.
Privacy Policy - Terms - Contact Us © voile276.org