From df7ba7cee8e39eb1b84a0478456bafca3daa3f47 Mon Sep 17 00:00:00 2001 From: michael starke Date: Fri, 27 Nov 2015 16:36:43 +0100 Subject: [PATCH] Using git commit count for build numbering. Signed-off-by: michael starke --- MacPass.xcodeproj/project.pbxproj | 7 ++--- .../xcshareddata/xcschemes/MacPass.xcscheme | 26 +++++-------------- MacPass/MacPass-Info.plist | 2 +- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 6c3c6364..4cf62b7f 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -1513,8 +1513,8 @@ 4C77E35E15B84A240093A587 /* Sources */, 4C77E35F15B84A240093A587 /* Frameworks */, 4C77E36015B84A240093A587 /* Resources */, + 4C44DB1B1C08999F00774EB3 /* Versioning */, 4CC5D36618A1332000AF7FA8 /* CopyFiles */, - 4CC5D36818A1353400AF7FA8 /* ShellScript */, ); buildRules = ( ); @@ -1782,18 +1782,19 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 4CC5D36818A1353400AF7FA8 /* ShellScript */ = { + 4C44DB1B1C08999F00774EB3 /* Versioning */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); + name = Versioning; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "LOCATION=\"${BUILT_PRODUCTS_DIR}\"/\"${FRAMEWORKS_FOLDER_PATH}\"\nIDENTITY=\"Mac Developer: Michael Starke\"\n#codesign --verbose --force --sign \"$IDENTITY\" \"$LOCATION/Sparkle.framework/Versions/A\""; + shellScript = "git=`sh /etc/profile; which git`\nbranch_name=`$git symbolic-ref HEAD | sed -e 's,.*/\\\\(.*\\\\),\\\\1,'`\ngit_count=`$git rev-list $branch_name |wc -l | sed 's/^ *//;s/ *$//'`\nsimple_branch_name=`$git rev-parse --abbrev-ref HEAD`\n\nbuild_number=\"$git_count\"\nif [ $CONFIGURATION != \"Release\" ]; then\nbuild_number+=\"-$simple_branch_name\"\nfi\n\nplist=\"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\ndsym_plist=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $build_number\" \"$plist\"\nif [ -f \"$DSYM_INFO_PLIST\" ] ; then\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $build_number\" \"$dsym_plist\"\nfi"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/MacPass.xcodeproj/xcshareddata/xcschemes/MacPass.xcscheme b/MacPass.xcodeproj/xcshareddata/xcschemes/MacPass.xcscheme index e5642bb1..7e31cf3d 100644 --- a/MacPass.xcodeproj/xcshareddata/xcschemes/MacPass.xcscheme +++ b/MacPass.xcodeproj/xcshareddata/xcschemes/MacPass.xcscheme @@ -1,7 +1,7 @@ + version = "1.3"> @@ -93,6 +93,11 @@ + + - - - - - - - - - - diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist index ae1f35e2..df836390 100644 --- a/MacPass/MacPass-Info.plist +++ b/MacPass/MacPass-Info.plist @@ -62,7 +62,7 @@ CFBundleSignature ???? CFBundleVersion - 2569 + UNDEFINED LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSAppTransportSecurity