Bill Kim
Bill Kim

Reputation: 1

how to customize buildCondition="IfModificationExists" on CruiseControlNet build?

Okay.. I've been searching this specific question, and did find some examples, but not exactly the answer I wanted. Any thoughts, inputs would be greatly appreciated!

Situation I have is..

I have a daily build process via CCNet. They all have a buildCondition="ifModificationExists" parameter when building. This allows the CCNet to build if and only if there are modifications (checking the source "Update").

Problem is, I added a version Commit process at the very last part of each builds. Meaning, if I were to build 1.0.0.3, I'd Commit the changed AssemblyInfo.cs files (that contains the updated version number), and allows me to check the logs when each of the versions were built.

This completely screwed up the entire automated daily build process.. You see, because it commits the version every build whether or not it has any other Updates, the CCNet considers there's ALWAYS a modification before building each morning. Fact is, the only modification there has been was the version update from last build.

I cant think of a way to get around this, by keeping the version update + daily automate build when modifications exists.

Any help? :)

edit 1. here's the Triggers part for each of my build:

<!--TRIGGERS --> 
    <triggers>
    <scheduleTrigger time="04:00" buildCondition="IfModificationExists" name="Scheduled"> 
    </scheduleTrigger>
    </triggers>

edit 2. and here's the part where I commit the files (AssemblyInfo.cs) using powershell

        <powershell>
            <script>commit.ps1</script>
            <executable>C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe</executable>
            <scriptsDirectory>D:\SRC\BuildTools</scriptsDirectory>
            <buildArgs>D:\SRC\ProjectName\branches\3.0.3\</buildArgs>
            <description>BuildCommit Dir D:\SRC\ProjectName\branches\3.0.3\src</description>
        </powershell>

Thank you in advance,

Upvotes: 0

Views: 811

Answers (1)

sinnerinc
sinnerinc

Reputation: 342

I think you should be able to use filtered source control to do what you need:

http://cruisecontrolnet.org/projects/ccnet/wiki/Filtered

Upvotes: 2

Related Questions