Permalink
Browse files

Fall back on CFBundleVersion if CFBundleShortVersionString isn't pres…

…ent in the plist. Fixes a crash for a nil key when archiving the build for Xcode 4.
  • Loading branch information...
1 parent 4598bb2 commit 0600c91c7bff331141f00f86079c126cdb6dbbe5 @subdigital subdigital committed Jul 27, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/beta_builder/archived_build.rb
@@ -70,11 +70,12 @@ def save_to(path)
private
def write_plist_to(path)
+ version = metadata["CFBundleShortVersionString"] || metadata["CFBundleVersion"]
plist = {
"ApplicationProperties" => {
"ApplicationPath" => File.join("Applications", @configuration.app_file_name),
"CFBundleIdentifier" => metadata["CFBundleIdentifier"],
- "CFBundleShortVersionString" => metadata["CFBundleShortVersionString"],
+ "CFBundleShortVersionString" => version,
"IconPaths" => metadata["CFBundleIconFiles"].map { |file| File.join("Applications", @configuration.app_file_name, file) }
},
"ArchiveVersion" => 1.0,

0 comments on commit 0600c91

Please sign in to comment.