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 +4 -4
- data/lib/xcode_builder.rb +0 -4
- data/lib/xcode_builder/configuration.rb +11 -28
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61f2c186bfa641c9e2eadf057e6a7748d6dc669b
|
4
|
+
data.tar.gz: 13834c56ca7c3acc454974334bda8bfc11c6365e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
125
|
-
|
126
|
-
|
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
|
-
|
129
|
-
|
112
|
+
# re inject new version number into the data
|
113
|
+
data["CFBundleVersion"] = DateTime.now.strftime("%Y-%m-%d %k:%M")
|
130
114
|
|
131
|
-
|
132
|
-
|
133
|
-
|
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.
|
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-
|
11
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: CFPropertyList
|