Building and releasing iPhone apps and at the same time versioning them easily can be a bit tedious. Several posts (like this or this) show how to use agvtool for automated versioning. But for me this is still not automated enough.
This post here pointed me to a Rakefile which I can use to bump versions, build and zip the application for uploading to the AppStore. Being myself a ruby developer, it was easy for me to modify the Rakefile to include bumping marketing version number also automatically. The following Rakefile builds with ‘rake release‘, which also bumps Project versions and minor marketing version. The task ‘rake bump:major‘ can be used to bump to next major version.