Skip to content

Commit

Permalink
Add config
Browse files Browse the repository at this point in the history
  • Loading branch information
satococoa committed Jan 23, 2013
1 parent 11807eb commit dcdf9d1
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -13,4 +13,5 @@ nbproject
.eprj
vendor/bundle
vendor/Pods
.bundle
.bundle
config.yml
24 changes: 24 additions & 0 deletions Rakefile
Expand Up @@ -4,9 +4,14 @@ require 'motion/project'
require 'bundler/setup'
Bundler.require :default

require 'yaml'

Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'RubyFriendsCamera'
app.version = '1.0.0'
app.short_version = '1.0.0'
app.interface_orientations = [:portrait]
app.frameworks += [
'Social',
'Accelerate',
Expand All @@ -16,6 +21,25 @@ Motion::Project::App.setup do |app|
'QuartzCore',
'CoreImage'
]

conf_file = './config.yml'
if File.exists?(conf_file)
config = YAML::load_file(conf_file)
# app.testflight.sdk = 'vendor/TestFlightSDK'
# app.testflight.api_token = config['testflight']['api_token']
# app.testflight.team_token = config['testflight']['team_token']
# app.testflight.notify = true
# app.testflight.distribution_lists = config['testflight']['distribution_lists']
app.identifier = config['identifier']
app.info_plist['CFBundleURLTypes'] = [
{ 'CFBundleURLName' => config['identifier'],
'CFBundleURLSchemes' => ['ruby-friends-camera'] }
]

env = ENV['ENV'] || 'development'
app.codesign_certificate = config[env]['certificate']
app.provisioning_profile = config[env]['provisioning']
end

app.pods do
pod 'NanoStore', '~> 2.5.3'
Expand Down
19 changes: 19 additions & 0 deletions config.yml.sample
@@ -0,0 +1,19 @@
testflight:
api_token: API_TOKEN
team_token: TEAM_TOKEN
distribution_lists:
- DIST_LISTS

identifier: com.example.coolapp

development:
certificate: 'iPhone Developer: foo (bar)'
provisioning: '/path/to/foo.mobileprovision'

adhoc:
certificate: 'iPhone Distribution: foo'
provisioning: '/path/to/foo.mobileprovision'

release:
certificate: 'iPhone Distribution: foo'
provisioning: '/path/to/foo.mobileprovision'

0 comments on commit dcdf9d1

Please sign in to comment.