Last active
December 17, 2015 00:39
-
-
Save hboon/5522694 to your computer and use it in GitHub Desktop.
Rakefile.rb snippet for environments (dev and adhoc). Based on https://gist.github.com/bensheldon/5521403. See https://groups.google.com/forum/?fromgroups=#!topic/rubymotion/OUuhiClJ0EY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env = if ENV['dev'] == '1' | |
'dev' | |
elsif ENV['adhoc'] == '1' | |
'adhoc' | |
else | |
'dev' #default | |
end | |
if env == 'dev' | |
app.codesign_certificate = 'iPhone Developer: Hwee Boon Yar (something)' | |
app.provisioning_profile = 'full path to mobileprovision' | |
app.entitlements['get-task-allow'] = true | |
elsif env == 'adhoc' | |
app.codesign_certificate = 'iPhone Distribution: Hwee Boon Yar' | |
app.provisioning_profile = 'full path to mobileprovision' | |
app.entitlements['get-task-allow'] = false | |
end |
This doesn't work for me though because the :testflight task uses :archive which according to https://github.com/HipByte/RubyMotion/blob/master/lib/motion/project.rb doesn't use :release. I assume that is because RubyMotion wants to retain symbols for debugging?
So TestFlight builds will trigger app.development and not get the right code-sign configuration.
All in all, app.development and app.release seems very strange though. I'm not sure it's designed for the right purpose?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This uses some of the built in RubyMotion environment methods: