xcodebuilder 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 429a1bec9d2c370b7308954090e8241d45230b4a
4
- data.tar.gz: 83d1b3b2b8752bed01610e089178fd6d51134928
3
+ metadata.gz: 61f2c186bfa641c9e2eadf057e6a7748d6dc669b
4
+ data.tar.gz: 13834c56ca7c3acc454974334bda8bfc11c6365e
5
5
  SHA512:
6
- metadata.gz: cc22f2eb525399118da258b6c1b60ea787df5a073836511995f470cae0b4df607ac12b873995e3a666c4dda34f55188d2f4a38d0ad655b1be67def2df1c554ce
7
- data.tar.gz: 7a870497e18348b1a95c5557c00c55dea239a7a38b50d86d25a5ac18f5fb37d63b666e5f2ff026b0e3955eb43aa28ef26f60f4c0e2baeb459ddff84933e0d158
6
+ metadata.gz: dbab4c92062bcfe006f978bf24e70b17a5c38c0fdd540cc39ec44d65b6f2f30391390c1e2e70db91f27bf725b424940b42961c4b9833e88442139a5a3b8e5c43
7
+ data.tar.gz: 89cbc68cef52955205d738af1dbdb36ed728bf080366d84301a1144583bbdb7bc6447cf0b9fdad3bbc381b9067c37290a1b7309c384bee99b228628a99f0b161
data/lib/xcode_builder.rb CHANGED
@@ -32,10 +32,6 @@ module XcodeBuilder
32
32
  )
33
33
  @namespace = namespace
34
34
  yield @configuration if block_given?
35
-
36
- # expand the info plist path, as it's likely to be relative and we'll be fucking
37
- # around with the cwd later on.
38
- @configuration.info_plist = File.expand_path @configuration.info_plist unless @configuration.info_plist == nil
39
35
  end
40
36
 
41
37
  def xcodebuild(*args)
@@ -38,14 +38,6 @@ module XcodeBuilder
38
38
  raise ArgumentError, "app_name or target must be set in the BetaBuilder configuration block" if app_name.nil?
39
39
  "#{app_name}.app"
40
40
  end
41
-
42
- def info_plist_path
43
- if info_plist != nil then
44
- File.expand_path info_plist
45
- else
46
- nil
47
- end
48
- end
49
41
 
50
42
  def build_number
51
43
  # we have a podspec file, so try to get the version out of that
@@ -53,16 +45,7 @@ module XcodeBuilder
53
45
  # get hte version out of the pod file
54
46
  return build_number_from_podspec
55
47
  end
56
-
57
- # no plist is found, return a nil version
58
- if (info_plist_path == nil) || (!File.exists? info_plist_path) then
59
- return nil
60
- end
61
-
62
- # read the plist and extract data
63
- plist = CFPropertyList::List.new(:file => info_plist_path)
64
- data = CFPropertyList.native_types(plist.value)
65
- data["CFBundleShortVersionString"]
48
+ return nil
66
49
  end
67
50
 
68
51
  def build_number_from_podspec
@@ -121,20 +104,20 @@ module XcodeBuilder
121
104
  return false
122
105
  end
123
106
 
124
- # read the plist and extract data
125
- plist = CFPropertyList::List.new(:file => info_plist_path)
126
- data = CFPropertyList.native_types(plist.value)
107
+ Array(info_plist).each {|current_plist|
108
+ # read the plist and extract data
109
+ plist = CFPropertyList::List.new(:file => File.expand_path(current_plist))
110
+ data = CFPropertyList.native_types(plist.value)
127
111
 
128
- # re inject new version number into the data
129
- data["CFBundleVersion"] = DateTime.now.strftime("%Y-%m-%d %k:%M")
112
+ # re inject new version number into the data
113
+ data["CFBundleVersion"] = DateTime.now.strftime("%Y-%m-%d %k:%M")
130
114
 
131
- # recreate the plist and save it
132
- plist.value = CFPropertyList.guess(data)
133
- plist.save(info_plist_path, CFPropertyList::List::FORMAT_XML)
115
+ # recreate the plist and save it
116
+ plist.value = CFPropertyList.guess(data)
117
+ plist.save(current_plist, CFPropertyList::List::FORMAT_XML)
118
+ }
134
119
  end
135
120
 
136
-
137
-
138
121
  def ipa_name
139
122
  prefix = app_name == nil ? target : app_name
140
123
  "#{prefix}#{built_app_long_version_suffix}.ipa"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcodebuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Larivain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-08 00:00:00.000000000 Z
11
+ date: 2015-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: CFPropertyList