highway 1.0.3 → 1.0.6

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
  SHA256:
3
- metadata.gz: 8d814473d8bcfe9e97c74925c8bb57411abf30adbc297465f6a69057d1b327f9
4
- data.tar.gz: 32fdb8f69d6b1d6bf29debf059f36a141acb45bb73ed5d176a6f9a4c0af06d70
3
+ metadata.gz: 470af68392dfcbc58452bc54eb5bea71bfe008b83b03de55b0f902113694298a
4
+ data.tar.gz: d86fc2e7fcd80362a98a688d6500972af20c5528cfa2b487f9deba97b007e997
5
5
  SHA512:
6
- metadata.gz: 6419ec32e6c057c70a6739956a20864326f6deceb4666021912abbeb06366ab618bae31e525fd084c2326be39cb77a5bbc953a630400c8296b5dba00a343f6c4
7
- data.tar.gz: 284c01220f521f7d384896703e3f8d6af1f224ad7e4a18141771e6056215d49949cf9d5bcd23b507ae47dc4e91c8ee1a5ee0b4f81d90f47287a7e808bc965122
6
+ metadata.gz: 0bead069ffbdf46d9221aa99b2feb1407dd50fb724fa1c5e30ce6cca9ae5e4e7cb3a3c9285a22a49efd43fe5db28bd26ea4428fb90566d22fa7e30dd570af857
7
+ data.tar.gz: 5a464d1abb3fde76a40acd5ddfe280ad8110ec1138340f71e59a2744821e30a856d0b9037efa54819360348a78ebca7da7e20e4a3ff5934c5c672dfc43153760
@@ -10,9 +10,9 @@ require "highway/steps/infrastructure"
10
10
  module Highway
11
11
  module Steps
12
12
  module Library
13
-
13
+
14
14
  class AppCenterStep < Step
15
-
15
+
16
16
  def self.name
17
17
  "appcenter"
18
18
  end
@@ -20,7 +20,7 @@ module Highway
20
20
  def self.plugin_name
21
21
  "fastlane-plugin-appcenter"
22
22
  end
23
-
23
+
24
24
  def self.parameters
25
25
  [
26
26
  Parameters::Single.new(
@@ -60,12 +60,18 @@ module Highway
60
60
  required: false,
61
61
  type: Types::Bool.new(),
62
62
  default: false
63
+ ),
64
+ Parameters::Single.new(
65
+ name: "release_notes",
66
+ required: false,
67
+ type: Types::String.new(),
68
+ default: ""
63
69
  )
64
70
  ]
65
71
  end
66
-
72
+
67
73
  def self.run(parameters:, context:, report:)
68
-
74
+
69
75
  app_name = parameters["app_name"]
70
76
  api_token = parameters["api_token"]
71
77
  destinations = parameters["distribution_group"]
@@ -73,9 +79,10 @@ module Highway
73
79
  notify = parameters["notify"]
74
80
  owner_name = parameters["owner_name"]
75
81
  upload_dsym_only = parameters["upload_dsym_only"]
82
+ release_notes = parameters["release_notes"]
76
83
 
77
84
  context.assert_gem_available!(plugin_name)
78
-
85
+
79
86
  context.run_action("appcenter_upload", options: {
80
87
  api_token: api_token,
81
88
  owner_name: owner_name,
@@ -83,34 +90,35 @@ module Highway
83
90
  destinations: destinations,
84
91
  notify_testers: notify,
85
92
  dsym: dsym,
86
- upload_dsym_only: upload_dsym_only
93
+ upload_dsym_only: upload_dsym_only,
94
+ release_notes: release_notes
87
95
  })
88
-
96
+
89
97
  response = context.fastlane_lane_context[:APPCENTER_BUILD_INFORMATION]
90
98
 
91
99
  unless response.nil?
92
100
  report[:deployment] = {
93
-
101
+
94
102
  service: "AppCenter",
95
-
103
+
96
104
  package: {
97
105
  name: response["app_display_name"],
98
106
  version: response["short_version"],
99
107
  build: response["version"],
100
108
  },
101
-
109
+
102
110
  urls: {
103
111
  install: response["install_url"],
104
112
  view: response["download_url"],
105
113
  },
106
-
114
+
107
115
  }
108
116
  end
109
-
117
+
110
118
  end
111
-
119
+
112
120
  end
113
-
121
+
114
122
  end
115
123
  end
116
- end
124
+ end
@@ -0,0 +1,128 @@
1
+ #
2
+ # code_sign.rb
3
+ # Copyright © 2020 Netguru S.A. All rights reserved.
4
+ #/
5
+
6
+ require "highway/steps/infrastructure"
7
+ require "gpgme"
8
+
9
+ module Highway
10
+ module Steps
11
+ module Library
12
+
13
+ class CodeSignStep < Step
14
+
15
+ def self.name
16
+ "code_sign"
17
+ end
18
+
19
+ def self.parameters
20
+ [
21
+ Parameters::Single.new(
22
+ name: "path",
23
+ required: true,
24
+ type: Types::String.new()
25
+ ),
26
+ Parameters::Single.new(
27
+ name: "passphrase",
28
+ required: true,
29
+ type: Types::String.new()
30
+ ),
31
+ Parameters::Single.new(
32
+ name: "keychain_name",
33
+ required: false,
34
+ type: Types::String.new()
35
+ ),
36
+ Parameters::Single.new(
37
+ name: "keychain_password",
38
+ required: false,
39
+ type: Types::String.new()
40
+ )
41
+ ]
42
+ end
43
+
44
+ def self.run(parameters:, context:, report:)
45
+ path = parameters["path"]
46
+ passphrase = parameters["passphrase"]
47
+ keychain_name = parameters["keychain_name"]
48
+ keychain_password = parameters["keychain_password"]
49
+
50
+ # First of all, check if file exist.
51
+
52
+ unless File.exist?(path)
53
+ context.interface.fatal!("File '#{path}' does not exist.")
54
+ end
55
+
56
+ # Now prepare output directory and file.
57
+
58
+ output_temp_dir = Dir.mktmpdir()
59
+ output_archive_name = "decrypted.zip"
60
+ output_file_path = File.join(output_temp_dir, output_archive_name)
61
+ output_file = File.open(output_file_path, "w+")
62
+
63
+ # Decrypt given archive.
64
+
65
+ crypto = GPGME::Crypto.new
66
+ begin
67
+ crypto.decrypt(File.open(path), { :password => passphrase, :output => output_file, :pinentry_mode => GPGME::PINENTRY_MODE_LOOPBACK })
68
+ rescue
69
+ context.interface.fatal!("Cannot decrypt with given passphrase.")
70
+ end
71
+
72
+ # Unzip decrypted archive.
73
+
74
+ zipped_files = Array[]
75
+ Zip::File.open(output_file_path) do |zip_file|
76
+ zip_file.each do |file|
77
+ file_path = File.join(output_temp_dir, file.name)
78
+ unless file_path.match?(/\.DS_Store|__MACOSX|(^|\/)\._/)
79
+ zip_file.extract(file, file_path) unless File.exist?(file_path)
80
+ zipped_files.push(file_path) unless File.directory?(file_path)
81
+ end
82
+ end
83
+ end
84
+
85
+ # Filter paths to certificates and profiles.
86
+
87
+ provisioning_profile_paths = zipped_files.grep(/.*\.mobileprovision/)
88
+ certificates_paths = zipped_files.grep(/.*\.p12/)
89
+
90
+ # Prepare new keychain.
91
+
92
+ keychain_name = "highway.keychain-db" if keychain_name.nil?
93
+ keychain_password = passphrase if keychain_password.nil?
94
+ context.run_action("create_keychain", options: {
95
+ name: keychain_name,
96
+ password: keychain_password,
97
+ default_keychain: true,
98
+ unlock: true,
99
+ timeout: 72000,
100
+ lock_when_sleeps: true,
101
+ lock_after_timeout: true,
102
+ add_to_search_list: true
103
+ })
104
+
105
+ # Install provisioning profiles.
106
+
107
+ provisioning_profile_paths.each do |path|
108
+ context.run_action("install_provisioning_profile", options: {
109
+ path: path
110
+ })
111
+ end
112
+
113
+ # Install certificates.
114
+
115
+ certificates_paths.each do |path|
116
+ context.run_action("import_certificate", options: {
117
+ certificate_path: path,
118
+ certificate_password: passphrase,
119
+ keychain_name: keychain_name,
120
+ keychain_password: keychain_password
121
+ })
122
+ end
123
+ end
124
+
125
+ end
126
+ end
127
+ end
128
+ end
@@ -111,6 +111,7 @@ module Highway
111
111
  output_dir = context.artifacts_dir
112
112
  output_types = ["html", "junit"].join(",")
113
113
  output_files = [output_html_file, output_junit_file].join(",")
114
+ xcodebuild_formatter = "xcpretty"
114
115
 
115
116
  # Prepare temporary variables.
116
117
 
@@ -139,6 +140,7 @@ module Highway
139
140
  output_directory: output_dir,
140
141
  output_types: output_types,
141
142
  output_files: output_files,
143
+ xcodebuild_formatter: xcodebuild_formatter,
142
144
 
143
145
  })
144
146
 
@@ -6,6 +6,6 @@
6
6
  module Highway
7
7
 
8
8
  # Version of Highway gem.
9
- VERSION = "1.0.3".freeze
9
+ VERSION = "1.0.6".freeze
10
10
 
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: highway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Netguru
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-01 00:00:00.000000000 Z
11
+ date: 2022-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane
@@ -90,6 +90,46 @@ dependencies:
90
90
  - - "<="
91
91
  - !ruby/object:Gem::Version
92
92
  version: 1.0.0
93
+ - !ruby/object:Gem::Dependency
94
+ name: gpgme
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 2.0.0
100
+ - - "<="
101
+ - !ruby/object:Gem::Version
102
+ version: 3.0.0
103
+ type: :runtime
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: 2.0.0
110
+ - - "<="
111
+ - !ruby/object:Gem::Version
112
+ version: 3.0.0
113
+ - !ruby/object:Gem::Dependency
114
+ name: rubyzip
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: 2.0.0
120
+ - - "<="
121
+ - !ruby/object:Gem::Version
122
+ version: 3.0.0
123
+ type: :runtime
124
+ prerelease: false
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: 2.0.0
130
+ - - "<="
131
+ - !ruby/object:Gem::Version
132
+ version: 3.0.0
93
133
  - !ruby/object:Gem::Dependency
94
134
  name: rake
95
135
  requirement: !ruby/object:Gem::Requirement
@@ -132,8 +172,8 @@ dependencies:
132
172
  - - "~>"
133
173
  - !ruby/object:Gem::Version
134
174
  version: 0.17.0
135
- description:
136
- email:
175
+ description:
176
+ email:
137
177
  executables: []
138
178
  extensions: []
139
179
  extra_rdoc_files: []
@@ -172,6 +212,7 @@ files:
172
212
  - lib/highway/steps/library/appstore.rb
173
213
  - lib/highway/steps/library/carthage.rb
174
214
  - lib/highway/steps/library/cocoapods.rb
215
+ - lib/highway/steps/library/code_sign.rb
175
216
  - lib/highway/steps/library/copy_artifacts.rb
176
217
  - lib/highway/steps/library/lane.rb
177
218
  - lib/highway/steps/library/sh.rb
@@ -201,7 +242,7 @@ licenses:
201
242
  - MIT
202
243
  metadata:
203
244
  source_code_uri: https://github.com/netguru/highway
204
- post_install_message:
245
+ post_install_message:
205
246
  rdoc_options: []
206
247
  require_paths:
207
248
  - lib
@@ -216,8 +257,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
257
  - !ruby/object:Gem::Version
217
258
  version: '0'
218
259
  requirements: []
219
- rubygems_version: 3.1.2
220
- signing_key:
260
+ rubygems_version: 3.1.6
261
+ signing_key:
221
262
  specification_version: 4
222
263
  summary: Build system on top of Fastlane.
223
264
  test_files: []