From 5bdaab9672ce07f974798dbd3c39139f00e5c499 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 17 Dec 2007 15:15:22 -0500 Subject: [PATCH] Set up the build number and bundle versions * Info.plist * Scrabbalize.xcodeproj: Build script to generate git number --- Info.plist | 6 +++++- Scrabbalize.xcodeproj/project.pbxproj | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Info.plist b/Info.plist index 933166a..3d7f5cc 100644 --- a/Info.plist +++ b/Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - com.yourcompany.Scrabbalize + org.bluestatic.scrabbalize CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -20,6 +20,10 @@ ???? CFBundleVersion 1.0 + CFBundleShortVersionString + 1.0 Beta 1 + CFBundleGetInfoString + ${EXECUTABLE_NAME} 1.0 Beta 1, Copyright 2007 Blue Static NSMainNibFile MainMenu NSPrincipalClass diff --git a/Scrabbalize.xcodeproj/project.pbxproj b/Scrabbalize.xcodeproj/project.pbxproj index 8d0266e..06b1bd1 100644 --- a/Scrabbalize.xcodeproj/project.pbxproj +++ b/Scrabbalize.xcodeproj/project.pbxproj @@ -134,6 +134,7 @@ 8D1107290486CEB800E47090 /* Resources */, 8D11072C0486CEB800E47090 /* Sources */, 8D11072E0486CEB800E47090 /* Frameworks */, + 1EAAC91E0D170FA40058A23D /* ShellScript */, ); buildRules = ( ); @@ -175,6 +176,22 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 1EAAC91E0D170FA40058A23D /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /usr/bin/ruby; + shellScript = "require \"ftools\"\nrequire \"Time\"\n\nhash = %x{/usr/local/bin/git log -1 --pretty=format:%h}\ntimestamp = %x{/usr/local/bin/git log -1 --pretty=format:%ct}\ntime = Time.at(timestamp.to_i)\n\nbuild = (\"%02d\" % time.year) + (\"%02d\" % time.month) + (\"%02d\" % time.day) + \".\" + hash\n\ninfopath = ENV[\"CONFIGURATION_BUILD_DIR\"] + \"/\" + ENV[\"INFOPLIST_PATH\"]\n\nfile = \"\"\nio = File.new(infopath)\nlastline = \"\"\nwhile line = io.gets do\n\tif lastline.match(\"CFBundleVersion\")\n\t\tfile += \"\\t#{build}\\n\"\n\telse\n\t\tfile += line\n\tend\n\tlastline = line\nend\nio.close\n\nio = File.new(infopath, \"w\")\nio.write(file)\nio.close"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 8D11072C0486CEB800E47090 /* Sources */ = { isa = PBXSourcesBuildPhase; -- 2.22.5