Skip to content

Instantly share code, notes, and snippets.

@bensheldon
Last active December 17, 2015 00:29
Show Gist options
  • Save bensheldon/5521403 to your computer and use it in GitHub Desktop.
Save bensheldon/5521403 to your computer and use it in GitHub Desktop.
desc "Generate Adhoc build"
task :adhoc => [
:deep_clean,
:set_adhoc,
"archive:distribution",
:zip_dsym
]
desc "Generate App Store Build"
task :appstore => [
:deep_clean,
"archive:distribution",
:zip_dsym
]
task :set_adhoc do
ENV['adhoc'] = "true"
end
task :deep_clean do
sh "rake clean"
end
task :zip_dsym do
# Remove any existing zip
`rm #{build_path}#{dsym_name}.zip`
sh "cd #{build_path} && zip -r dayoftheshirt.dsym.zip #{dsym_name}"
end
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'motion-cocoapods'
require 'bundler'
Bundler.require
Dir.glob('lib/tasks/*.rake').each { |r| import r }
VERSION = "1.0.2"
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = "Today's Shirts"
app.version = VERSION
env = lambda do
if ENV["adhoc"] == "true"
return "adhoc"
elsif ENV["release"] == "true"
return "release"
else
app.release do
return "release"
end
app.development do
return "development"
end
end
nil
end
app.icons = %w[development-29.png development-57.png development-58.png development-72.png development-144.png]
app.prerendered_icon = true
app.development do
app.identifier = "com.dayoftheshirt.dayoftheshirt.development"
app.codesign_certificate = "iPhone Developer: Benjamin Sheldon (DW62Y5PWXZ)"
app.provisioning_profile = "provisions/Development.mobileprovision"
app.entitlements['get-task-allow'] = true
end
app.release do
if ENV['adhoc'] == "true"
app.identifier = "com.dayoftheshirt.dayoftheshirt.adhoc"
app.provisioning_profile = "provisions/Adhoc.mobileprovision"
else
app.identifier = "com.dayoftheshirt.dayoftheshirt"
app.provisioning_profile = "provisions/Release.mobileprovision"
app.icons = %w[icon-29.png icon-57.png icon-58.png icon-72.png icon-144.png]
end
app.codesign_certificate = "iPhone Distribution: Benjamin Sheldon (2NDN22N36W)"
app.entitlements['get-task-allow'] = false
end
app.interface_orientations = [:portrait]
app.info_plist['UIStatusBarStyle'] = 'UIStatusBarStyleBlackTranslucent'
app.info_plist['AppConfig'] = YAML.load_file("config/#{env.call}.yml")
config = app.info_plist['AppConfig']
app.deployment_target = "6.0"
app.frameworks += %w[
MessageUI
]
app.pods do
pod "AFNetworking", '~> 1.2.0'
pod 'Reachability', '~> 3.0.0'
pod "ECSlidingViewController", '~> 0.9.0'
pod 'CrittercismSDK', '~> 3.5.1'
pod 'GoogleAnalytics-iOS-SDK', '~> 2.0beta4'
end
app.vendor_project('vendor/GGFullscreenImageViewController', :static)
app.info_plist['CFBundleShortVersionString'] = VERSION
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment