Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save abhishekbedi1432/871a3931de0fac6f3be9473fa91b3247 to your computer and use it in GitHub Desktop.

Select an option

Save abhishekbedi1432/871a3931de0fac6f3be9473fa91b3247 to your computer and use it in GitHub Desktop.

Revisions

  1. @abury abury revised this gist Nov 29, 2011. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,11 @@ appname="AwesomeApp"
    target_name="$appname"
    sdk="iphoneos"
    certificate="iPhone Developer: Joe Blogs"
    project_dir="$/Users/username/Documents/apps/$appname"

    # To use as a fixed script use the first project_dir varirable.
    # If you are including it as a build step with Hudson, use the second variable passing in $WORKSPACE as the variable
    #project_dir="$HOME/Documents/apps/$appname"
    #projet_dir="$1/$appname"
    build_location="$HOME/Builds/$appname"

    #Create folder location for build files if they dont exist
  2. @abury abury created this gist Nov 29, 2011.
    22 changes: 22 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    #!/bin/sh

    # Simple iOS build script
    # Written by Aron Bury, 29/11/2011

    appname="AwesomeApp"
    target_name="$appname"
    sdk="iphoneos"
    certificate="iPhone Developer: Joe Blogs"
    project_dir="$/Users/username/Documents/apps/$appname"
    build_location="$HOME/Builds/$appname"

    #Create folder location for build files if they dont exist
    if [ ! -d "$build_location" ]; then
    mkdir -p "$build_location"
    fi

    cd "$project_dir"

    xcodebuild -target "$appname" OBJROOT="$build_location/obj.root" SYMROOT="$build_location/sym.root"

    xcrun -sdk iphoneos PackageApplication -v "$build_location/sym.root/Release-iphoneos/$appname.app" -o "$build_location/$appname.ipa" --sign "$certificate"