jenkinsutil 1.0.54 → 1.0.55
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jenkins_util.rb +3 -0
- data/lib/jenkins_util/argument_handler.rb +6 -0
- data/lib/jenkins_util/xcode_util.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 538ac0c9a5f927b3194d978aa13fa9bbe491facc
|
4
|
+
data.tar.gz: a094574a10dc90bf528b423de966aa54465aa9a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02d9f64b859b66b054deb1415734c5f65b353e92286ebfbe362e1d3733255af08a21d6516cc7f0cb6a414a44982370cdf8144a475e0d70ea5fafe05a028a6ab6
|
7
|
+
data.tar.gz: 41a9d68577ccf7da52eba834fe2cc70e45923508ba2e9364abef6dfaf6a84a0c88fb34e2a0a4f4064271f38634d4f94bf9b7d6b2c329e1352f01e15ce9177db3
|
data/lib/jenkins_util.rb
CHANGED
@@ -47,11 +47,14 @@ module JenkinsUtil
|
|
47
47
|
|
48
48
|
# Not using LoggerUtil so there is no time stamp
|
49
49
|
puts XcodeUtil.team_id_from_plist(args.xcode_export_plist) if !args.xcode_export_plist.nil?
|
50
|
+
puts XcodeUtil.build_name(args.xcode_archive_plist) if !args.xcode_archive_plist.nil?
|
50
51
|
|
51
52
|
if !args.xcode_project_path.nil? && !args.xcode_set_manual_provisioning_style.nil?
|
52
53
|
XcodeUtil.project_provisioning_style(args.xcode_project_path, !args.xcode_set_manual_provisioning_style)
|
53
54
|
end
|
54
55
|
|
56
|
+
|
57
|
+
|
55
58
|
if (!args.zip_sources.empty? || !args.zip_archive.nil?) && !args.zip_destination.nil?
|
56
59
|
ZipUtil.compress(*args.zip_sources, args.zip_destination) unless args.zip_sources.empty?
|
57
60
|
ZipUtil.uncompress(args.zip_archive, args.zip_destination) unless args.zip_archive.nil?
|
@@ -18,6 +18,7 @@ class ArgumentHandler
|
|
18
18
|
:xcode_bundle_identifier,
|
19
19
|
:xcode_build_number,
|
20
20
|
:xcode_set_manual_provisioning_style,
|
21
|
+
:xcode_archive_plist,
|
21
22
|
:zip_sources,
|
22
23
|
:zip_archive,
|
23
24
|
:zip_destination,
|
@@ -43,6 +44,7 @@ class ArgumentHandler
|
|
43
44
|
@xcode_bundle_identifier = nil
|
44
45
|
@xcode_build_number = nil
|
45
46
|
@xcode_set_manual_provisioning_style = nil
|
47
|
+
@xcode_archive_plist = nil
|
46
48
|
@zip_sources = []
|
47
49
|
@zip_archive = nil
|
48
50
|
@zip_destination = nil
|
@@ -133,6 +135,10 @@ class ArgumentHandler
|
|
133
135
|
@xcode_set_manual_provisioning_style = true
|
134
136
|
end
|
135
137
|
|
138
|
+
opts.on('--xcode-get-build-name archive-plist', 'Gets the build name "NAME_v_VERSION_b_BUILD"') do |archive_plist|
|
139
|
+
@xcode_archive_plist = archive_plist
|
140
|
+
end
|
141
|
+
|
136
142
|
# zip_util
|
137
143
|
opts.on('--zip-compress s1,s2,s3', Array, 'Compress files into zip archive') do |sources|
|
138
144
|
@zip_sources = sources
|
@@ -67,6 +67,13 @@ class XcodeUtil
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
def self.build_name(archive_plist)
|
71
|
+
plist_path = File.expand_path(archive_plist)
|
72
|
+
plist = Plist.parse_xml(plist_path)
|
73
|
+
LoggerUtil.fatal("name not found, make sure to pass in the archive plist #{archive_plist}") if plist.nil? || !plist.key?('Name')
|
74
|
+
return "#{plist['Name']}_v_#{plist['ApplicationProperties']['CFBundleShortVersionString']}_b_#{plist['ApplicationProperties']['CFBundleVersion']}"
|
75
|
+
end
|
76
|
+
|
70
77
|
def self.project_provisioning_style(project_path, is_automatic = nil)
|
71
78
|
project = Xcodeproj::Project.open(project_path)
|
72
79
|
|