<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Automatic Build Sub-Versioning in Xcode</title>
	<atom:link href="http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/feed" rel="self" type="application/rss+xml" />
	<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode</link>
	<description>Mac &#38; Technology Writings by Daniel Jalkut</description>
	<lastBuildDate>Thu, 16 May 2013 21:58:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: mkbuild, an iPhone project build script &#8211; Whatever happened to Benjamin Ragheb?</title>
		<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/comment-page-1#comment-164800</link>
		<dc:creator>mkbuild, an iPhone project build script &#8211; Whatever happened to Benjamin Ragheb?</dc:creator>
		<pubDate>Mon, 11 Apr 2011 17:56:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/?p=23#comment-164800</guid>
		<description><![CDATA[[...] tags and automatically determines the next available build number. I briefly experimented with using the repository revision number, but decided it would be better to decouple the build numbering from the revision control system [...]]]></description>
		<content:encoded><![CDATA[<p>[...] tags and automatically determines the next available build number. I briefly experimented with using the repository revision number, but decided it would be better to decouple the build numbering from the revision control system [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/comment-page-1#comment-77944</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Mon, 02 Apr 2007 15:37:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/?p=23#comment-77944</guid>
		<description><![CDATA[It sounds like you&#039;re using a single subversion repository for multiple projects, and trying to script it so that you get roughly what you would see if you had separate repos for all the projects.

I personally use separate repos, though I&#039;ve often considered consolidating them. 

Your post gave me an idea though, that would address the problem I alluded to with the &quot;branches more up to date than later revisions&quot; problem. You just have to build in &quot;buffer space&quot; in the versioning scheme between major releases, to accommodate any ongoing branch work that might happen. 

For instance if I ship 1.2 with svn revision #138, then when I go to work on 2.0, I might start the CFBundleVersion at &quot;200 + svn&quot;. Then I would have the flexibiliity to make a reasonably large number of releases on the branch, and change the versioning strategy for the branch to no longer use the subversion number. 

It loses a lot of elegance, but at least it does work around the problem. If branched releases are relatively uncommon, this seems like a reasonable workaround.]]></description>
		<content:encoded><![CDATA[<p>It sounds like you&#8217;re using a single subversion repository for multiple projects, and trying to script it so that you get roughly what you would see if you had separate repos for all the projects.</p>
<p>I personally use separate repos, though I&#8217;ve often considered consolidating them. </p>
<p>Your post gave me an idea though, that would address the problem I alluded to with the &#8220;branches more up to date than later revisions&#8221; problem. You just have to build in &#8220;buffer space&#8221; in the versioning scheme between major releases, to accommodate any ongoing branch work that might happen. </p>
<p>For instance if I ship 1.2 with svn revision #138, then when I go to work on 2.0, I might start the CFBundleVersion at &#8220;200 + svn&#8221;. Then I would have the flexibiliity to make a reasonably large number of releases on the branch, and change the versioning strategy for the branch to no longer use the subversion number. </p>
<p>It loses a lot of elegance, but at least it does work around the problem. If branched releases are relatively uncommon, this seems like a reasonable workaround.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin LaCoste</title>
		<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/comment-page-1#comment-77941</link>
		<dc:creator>Kevin LaCoste</dc:creator>
		<pubDate>Mon, 02 Apr 2007 15:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/?p=23#comment-77941</guid>
		<description><![CDATA[I really like the idea of tying build numbers to something concrete/meaningful rather than just making an arbitrary decision to bump the number up now and then. I also believe that the Subversion link is a really good way to go.

My current thinking is to have a script that runs a log command using a range. The script could then count the number of checkins between the last release and the current release and use that value to increment the build number. If you commit changes to the repository every time you fix a bug or add a new feature then you end up with a reasonably accurate build number for each new release. That Subversion command would be something like:

svn log -r38:HEAD

As an example, I have a new project in my repository and I can see that the revision number is at 40 while the actual number of checkins for the project is only 16.

Any thoughts on this approach? Or better yet, any takers for whipping together the necessary scripts?]]></description>
		<content:encoded><![CDATA[<p>I really like the idea of tying build numbers to something concrete/meaningful rather than just making an arbitrary decision to bump the number up now and then. I also believe that the Subversion link is a really good way to go.</p>
<p>My current thinking is to have a script that runs a log command using a range. The script could then count the number of checkins between the last release and the current release and use that value to increment the build number. If you commit changes to the repository every time you fix a bug or add a new feature then you end up with a reasonably accurate build number for each new release. That Subversion command would be something like:</p>
<p>svn log -r38:HEAD</p>
<p>As an example, I have a new project in my repository and I can see that the revision number is at 40 while the actual number of checkins for the project is only 16.</p>
<p>Any thoughts on this approach? Or better yet, any takers for whipping together the necessary scripts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/comment-page-1#comment-77491</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Sun, 01 Apr 2007 15:36:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/?p=23#comment-77491</guid>
		<description><![CDATA[For the time being I am still using SVN versions or some slight variation on that theme. For instance when I acquired MarsEdit, it was using a different scheme, but one that kept the number quite low. It was I believe the marketing version as a single number, so since I bought MarsEdit at 1.1.2, the bundle version was 112. So from here on the bundle version in MarsEdit is (112 + My Subversion Revision Number).

The issues that have been raised with using the revision number have to do with complications that might arise from using the same repository to generate different versions of the app. For instance if I branch for 1.1.8 after releasing 1.2 of MarsEdit, then it will have a higher bundle version and therefore be perceived as &quot;more up to date&quot; than the 1.2.

I have considered moving to a more robust scheme that takes things like this into consideration, but I haven&#039;t bothered yet. Simply knowing about the limitation has been enough for me.]]></description>
		<content:encoded><![CDATA[<p>For the time being I am still using SVN versions or some slight variation on that theme. For instance when I acquired MarsEdit, it was using a different scheme, but one that kept the number quite low. It was I believe the marketing version as a single number, so since I bought MarsEdit at 1.1.2, the bundle version was 112. So from here on the bundle version in MarsEdit is (112 + My Subversion Revision Number).</p>
<p>The issues that have been raised with using the revision number have to do with complications that might arise from using the same repository to generate different versions of the app. For instance if I branch for 1.1.8 after releasing 1.2 of MarsEdit, then it will have a higher bundle version and therefore be perceived as &#8220;more up to date&#8221; than the 1.2.</p>
<p>I have considered moving to a more robust scheme that takes things like this into consideration, but I haven&#8217;t bothered yet. Simply knowing about the limitation has been enough for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin LaCoste</title>
		<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/comment-page-1#comment-77361</link>
		<dc:creator>Kevin LaCoste</dc:creator>
		<pubDate>Sun, 01 Apr 2007 11:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/?p=23#comment-77361</guid>
		<description><![CDATA[How are you handling this now? After reading through this and experimenting on my own it seems that Subversion revision numbers aren&#039;t the answer after all. Now that you&#039;ve got a handful of serious applications to speak for, have they forced you to come up with a better solution?]]></description>
		<content:encoded><![CDATA[<p>How are you handling this now? After reading through this and experimenting on my own it seems that Subversion revision numbers aren&#8217;t the answer after all. Now that you&#8217;ve got a handful of serious applications to speak for, have they forced you to come up with a better solution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JM Marino</title>
		<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/comment-page-1#comment-75443</link>
		<dc:creator>JM Marino</dc:creator>
		<pubDate>Thu, 29 Mar 2007 09:25:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/?p=23#comment-75443</guid>
		<description><![CDATA[Sorry, I was a bug in my last perl script !!

Try &lt;a href=&quot;http://jm.marino.free.fr/HOWTO/perl/xcode-auto-versioning.pl&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>Sorry, I was a bug in my last perl script !!</p>
<p>Try <a href="http://jm.marino.free.fr/HOWTO/perl/xcode-auto-versioning.pl" rel="nofollow">this</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taybin</title>
		<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/comment-page-1#comment-75213</link>
		<dc:creator>Taybin</dc:creator>
		<pubDate>Thu, 29 Mar 2007 00:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/?p=23#comment-75213</guid>
		<description><![CDATA[Here&#039;s the system I&#039;ve ended up using:

My Info.plist contains this:

	CFBundleVersion
	${CURRENT_PROJECT_VERSION}.$Revision$
	CFBundleGetInfoString
	${CURRENT_PROJECT_VERSION} (build: $Revision$)
	CFBundleShortVersionString
	${CURRENT_PROJECT_VERSION}


My Update Version script is essentially reduced to:

$info =~ s/\$Revision: (.*) \$/$1/g;


The idea is that the revision number is considered a submicro version.

This fixes the problem of stable branches because the macro version number will have priority.  And the CFBundleShortVersionString has the marketing number which ignores the build version entirely.

Any comments?]]></description>
		<content:encoded><![CDATA[<p>Here&#8217;s the system I&#8217;ve ended up using:</p>
<p>My Info.plist contains this:</p>
<p>	CFBundleVersion<br />
	${CURRENT_PROJECT_VERSION}.$Revision$<br />
	CFBundleGetInfoString<br />
	${CURRENT_PROJECT_VERSION} (build: $Revision$)<br />
	CFBundleShortVersionString<br />
	${CURRENT_PROJECT_VERSION}</p>
<p>My Update Version script is essentially reduced to:</p>
<p>$info =~ s/\$Revision: (.*) \$/$1/g;</p>
<p>The idea is that the revision number is considered a submicro version.</p>
<p>This fixes the problem of stable branches because the macro version number will have priority.  And the CFBundleShortVersionString has the marketing number which ignores the build version entirely.</p>
<p>Any comments?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taybin</title>
		<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/comment-page-1#comment-75185</link>
		<dc:creator>Taybin</dc:creator>
		<pubDate>Wed, 28 Mar 2007 23:58:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/?p=23#comment-75185</guid>
		<description><![CDATA[Possibly an even better way to get the SVN revision number: http://www.cocoabuilder.com/archive/message/cocoa/2005/8/3/143542]]></description>
		<content:encoded><![CDATA[<p>Possibly an even better way to get the SVN revision number: <a href="http://www.cocoabuilder.com/archive/message/cocoa/2005/8/3/143542" rel="nofollow">http://www.cocoabuilder.com/archive/message/cocoa/2005/8/3/143542</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taybin</title>
		<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/comment-page-1#comment-75125</link>
		<dc:creator>Taybin</dc:creator>
		<pubDate>Wed, 28 Mar 2007 20:29:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/?p=23#comment-75125</guid>
		<description><![CDATA[Oh, 123[BUILD] is much better than my setup.  [yoink]]]></description>
		<content:encoded><![CDATA[<p>Oh, 123[BUILD] is much better than my setup.  [yoink]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/23/automatic-build-sub-versioning-in-xcode/comment-page-1#comment-75118</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Wed, 28 Mar 2007 20:15:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/?p=23#comment-75118</guid>
		<description><![CDATA[Ah thanks. Fixed.

Taybin: it looks like he&#039;s added facility to template the injection of the number in the Info.plist. So instead of completely replacing the CFBundleVersion, it just injects the number into the part that is labeled &quot;[BUILD]&quot; ... so you can have CFBundleVersion set to &quot;123[BUILD]&quot; and if your svn version is 45 it will come out in the resulting app as &quot;12345&quot;.

By the way I realized I&#039;m assuming JM is a male. Apologies if this is incorrect.
]]></description>
		<content:encoded><![CDATA[<p>Ah thanks. Fixed.</p>
<p>Taybin: it looks like he&#8217;s added facility to template the injection of the number in the Info.plist. So instead of completely replacing the CFBundleVersion, it just injects the number into the part that is labeled &#8220;[BUILD]&#8221; &#8230; so you can have CFBundleVersion set to &#8220;123[BUILD]&#8221; and if your svn version is 45 it will come out in the resulting app as &#8220;12345&#8243;.</p>
<p>By the way I realized I&#8217;m assuming JM is a male. Apologies if this is incorrect.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

 Served from: www.red-sweater.com @ 2013-05-22 20:36:08 by W3 Total Cache -->