Class: BetaBuilder::Xcode4ArchivedBuild
- Inherits:
-
Object
- Object
- BetaBuilder::Xcode4ArchivedBuild
- Defined in:
- lib/beta_builder/archived_build.rb
Instance Method Summary collapse
- #applications_path ⇒ Object
- #archive_file_name ⇒ Object
- #archive_path_within(path) ⇒ Object
- #dsyms_path ⇒ Object
-
#initialize(configuration) ⇒ Xcode4ArchivedBuild
constructor
A new instance of Xcode4ArchivedBuild.
- #plist_info_path ⇒ Object
- #save_to(path) ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Xcode4ArchivedBuild
Returns a new instance of Xcode4ArchivedBuild.
30 31 32 |
# File 'lib/beta_builder/archived_build.rb', line 30 def initialize(configuration) @configuration = configuration end |
Instance Method Details
#applications_path ⇒ Object
42 43 44 |
# File 'lib/beta_builder/archived_build.rb', line 42 def applications_path File.join("Products", "Applications") end |
#archive_file_name ⇒ Object
34 35 36 |
# File 'lib/beta_builder/archived_build.rb', line 34 def archive_file_name "#{@configuration.archive_name} #{Time.now.strftime('%Y-%m-%d %H.%M')}.xcarchive" end |
#archive_path_within(path) ⇒ Object
38 39 40 |
# File 'lib/beta_builder/archived_build.rb', line 38 def archive_path_within(path) File.join(path, "#{Time.now.strftime('%Y-%m-%d')}", archive_file_name) end |
#dsyms_path ⇒ Object
46 47 48 |
# File 'lib/beta_builder/archived_build.rb', line 46 def dsyms_path "dSYMs" end |
#plist_info_path ⇒ Object
50 51 52 |
# File 'lib/beta_builder/archived_build.rb', line 50 def plist_info_path File.join(@configuration.built_app_path, "Info.plist") end |
#save_to(path) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/beta_builder/archived_build.rb', line 54 def save_to(path) archive_path = archive_path_within(path) FileUtils.mkdir_p(archive_path) application_path = File.join(archive_path, applications_path) FileUtils.mkdir_p(application_path) FileUtils.cp_r(@configuration.built_app_path, application_path) dsym_path = File.join(archive_path, dsyms_path) FileUtils.mkdir_p(dsym_path) FileUtils.cp_r(@configuration.built_app_dsym_path, dsym_path) write_plist_to(archive_path) archive_path end |