jenkinsutil 1.0.54 → 1.0.55

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1055eff6ff9d3fc9ac3cf9bf6662e0662141b238
4
- data.tar.gz: 0e2c55eca1d7e5925810e549830583556a6c8919
3
+ metadata.gz: 538ac0c9a5f927b3194d978aa13fa9bbe491facc
4
+ data.tar.gz: a094574a10dc90bf528b423de966aa54465aa9a5
5
5
  SHA512:
6
- metadata.gz: 857f54504e9a62e07319014a7d72e7ef6df5878599eaf8a379b19b529bebebdfb0586e2e22fc5ac2237a9f5b2ba3255d031b1b04c6c8785de3a74a954db13df0
7
- data.tar.gz: 2c6878d81dd15e46b3992a519d5eea712ebe1fab2acc91ba211de1c3813b39bcefc7d6391b3def599d38800c33c470611fe7427e49e0ccabe8367d5815c84cfd
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jenkinsutil
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.54
4
+ version: 1.0.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett McGinnis