ios_android_toolbox 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,41 @@ IO.foreach(logfile) do |line|
9
9
  #if /^[\sa-z\/]+codesign.*\.xcent(\s|")([^\s]+\.app|".+\.app")/.match line
10
10
  if /CodeSign\s+"?(.+\.app)"?/.match line
11
11
  app_name = $1
12
+ if not File.exist?(app_name)
13
+ # Let's try another one, maybe it was archived
14
+ symlink_app_name = app_name.gsub('/InstallationBuildProductsLocation/Applications/','/BuildProductsPath/Distribution-iphoneos/')
15
+ if File.symlink?(symlink_app_name)
16
+ xcode_archives_location = File.join(ENV['HOME'],'Library','Developer','Xcode','Archives')
17
+ ctime = File.lstat(symlink_app_name).ctime
18
+ scheme_name = ''
19
+ if /\/Build\/Intermediates\/ArchiveIntermediates\/([^\/]+)/.match symlink_app_name
20
+ scheme_name = $1
21
+ end
22
+ app_basename = File.basename(symlink_app_name)
23
+
24
+ tries = 5
25
+ while (tries -= 1) > 0
26
+ archive_date_folder = ctime.strftime('%Y-%m-%d')
27
+ archive_folder_name = "#{scheme_name} #{ctime.strftime('%y-%m-%d')} #{ctime.hour % 12}.#{ctime.strftime('%M %p')}.xcarchive"
28
+
29
+ dist_app_name = File.join(xcode_archives_location,
30
+ archive_date_folder,
31
+ archive_folder_name,
32
+ 'Products',
33
+ 'Applications',
34
+ app_basename)
35
+
36
+ # This might be a distribution one, let's check if it moved from
37
+ # InstallationBuildProductsLocation/Applications => BuildProductsPath/Distribution-iphoneos
38
+ if File.exist? dist_app_name
39
+ app_name = dist_app_name
40
+ tries = 0
41
+ end
42
+
43
+ ctime = ctime + 60
44
+ end
45
+ end
46
+ end
12
47
  puts app_name
13
48
  end
14
49
  end
@@ -104,7 +104,8 @@ module IosAndroidToolbox
104
104
  def self.profile_worth_installing?(path)
105
105
  new_profile = IosProvisioningProfile.new(path)
106
106
  loop_through_existing_profiles do |installed_profile|
107
- if installed_profile.app_id == new_profile.app_id
107
+ if installed_profile.app_id == new_profile.app_id and installed_profile.has_provisioned_devices? == new_profile.has_provisioned_devices?
108
+ puts "#{installed_profile.creation_date} #{new_profile.creation_date}"
108
109
  return false if installed_profile.creation_date >= new_profile.creation_date
109
110
  end
110
111
  end
@@ -1,3 +1,3 @@
1
1
  module IosAndroidToolbox
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ios_android_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 15
10
- version: 0.0.15
9
+ - 16
10
+ version: 0.0.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Igor Sales
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-08-21 00:00:00 Z
18
+ date: 2012-08-29 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: ""