fastlane-plugin-match_keystore 0.1.17 → 0.1.18

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
  SHA256:
3
- metadata.gz: 215e841f331c07eb0cc8983092e98a7bab444866adb58c13d116baf2e50d735a
4
- data.tar.gz: c1a225a8f120ee5727182341ab354b83cc2daf9b0b514a97b5b7fe0c3c0f5f7b
3
+ metadata.gz: a109e0eb2a91578a04778376e7a615618e06a85e4b62f303bb05e02b17475d82
4
+ data.tar.gz: 1d1c7e90bded78f03eb4056e5a1789f06de6e47fa8b1c0d53eb70e2f5a7c224a
5
5
  SHA512:
6
- metadata.gz: d1573d798e69ed20b7c262d2b19a636ed0bcb5b961ef98fb88c6afc043eb84d5fd2089b3928a249429a588539cc8e303d00876e4358835fd7d08991bd62a758c
7
- data.tar.gz: e954784d29bcede31cc6ff12944f24f50d3b3035cb1f4b35122fac72f9db57758c374a2e1b0a9b4a5aeed6565cbafdc85208d7d3120949655ba08fb3bcf64570
6
+ metadata.gz: 1da211c6429b73a41c3f997215902de7329d397e8976e42bbb79c4a61663bf4843ea1872e3a9756bb112039c7d11e0f42ec9f3d2346f7c4e0071fe0f190d92a4
7
+ data.tar.gz: 1c6abba20d95cd5b01659fd787c6e0fbbb718fc62cb4785781c3710bc6289933f6454fc54d67bd03c5dae4e47c03690b94992713c1ca18cdd0a2a4c52d975e84
data/README.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-match_keystore)
4
4
 
5
+ ## Machine requirements
6
+
7
+ * OpenSSL 1.1.1 min OR LibreSSL 2.9 min installed
8
+ * Git installed
9
+ * Android SDK & Build-tools installed
10
+ * ANDROID_HOME environment variable defined
11
+
5
12
  ## Getting Started
6
13
 
7
14
  This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-match_keystore`, add it to your project by running:
@@ -2,6 +2,7 @@ require 'fastlane/action'
2
2
  require 'fileutils'
3
3
  require 'os'
4
4
  require 'json'
5
+ require 'pry'
5
6
  require 'digest'
6
7
  require_relative '../helper/match_keystore_helper'
7
8
 
@@ -137,10 +138,15 @@ module Fastlane
137
138
  result
138
139
  end
139
140
 
140
- def self.gen_key(key_path, password)
141
+ def self.gen_key(key_path, password, compat_key)
141
142
  `rm -f '#{key_path}'`
142
143
  shaValue = self.sha512(password)
143
- `echo "#{shaValue}" > '#{key_path}'`
144
+ # Backward-compatibility
145
+ if compat_key == "1"
146
+ `echo "#{password}" | openssl dgst -sha512 | awk '{print $2}' | cut -c1-128 > '#{key_path}'`
147
+ else
148
+ `echo "#{shaValue}" > '#{key_path}'`
149
+ end
144
150
  end
145
151
 
146
152
  def self.encrypt_file(clear_file, encrypt_file, key_path, forceOpenSSL)
@@ -190,7 +196,7 @@ module Fastlane
190
196
 
191
197
  # Check SHA-512-File
192
198
  key_path = File.join(Dir.pwd, '/temp/key.txt')
193
- self.gen_key(key_path, fakeValue)
199
+ self.gen_key(key_path, fakeValue, false)
194
200
  shaValue = self.get_file_content(key_path).strip!
195
201
  excepted = "cc6a7b0d89cc61c053f7018a305672bdb82bc07e5015f64bb063d9662be4ec81ec8afa819b009de266482b6bd56b7068def2524c32f5b5d4d9db49ee4578499d"
196
202
  self.assert_equals("SHA-512-File", excepted, shaValue)
@@ -370,6 +376,7 @@ module Fastlane
370
376
  unit_test = params[:unit_test]
371
377
  build_tools_version = params[:build_tools_version]
372
378
  zip_align = params[:zip_align]
379
+ compat_key = params[:compat_key]
373
380
 
374
381
  # Test OpenSSL/LibreSSL
375
382
  if unit_test
@@ -410,7 +417,7 @@ module Fastlane
410
417
  raise "Security password is not defined! Please use 'match_secret' parameter for CI."
411
418
  end
412
419
  UI.message "Generating security key '#{key_name}'..."
413
- self.gen_key(key_path, security_password)
420
+ self.gen_key(key_path, security_password, compat_key)
414
421
  end
415
422
 
416
423
  # Check is 'security password' is well initialized:
@@ -557,6 +564,7 @@ module Fastlane
557
564
  self.decrypt_file(properties_encrypt_path, properties_path, key_path, false)
558
565
 
559
566
  properties = self.load_properties(properties_path)
567
+ Pry::ColorPrinter.pp(properties)
560
568
  key_password = properties['keyPassword']
561
569
  alias_name = properties['aliasName']
562
570
  alias_password = properties['aliasPassword']
@@ -671,16 +679,21 @@ module Fastlane
671
679
  description: "Define if plugin will run zipalign on APK before sign it (true by default)",
672
680
  optional: true,
673
681
  type: Boolean),
682
+ FastlaneCore::ConfigItem.new(key: :compat_key,
683
+ env_name: "MATCH_KEYSTORE_COMPAT_KEY",
684
+ description: "Define the compatibility key version used on local machine (nil by default)",
685
+ optional: true,
686
+ type: String),
674
687
  FastlaneCore::ConfigItem.new(key: :clear_keystore,
675
688
  env_name: "MATCH_KEYSTORE_CLEAR",
676
689
  description: "Clear the local keystore (false by default)",
677
690
  optional: true,
678
691
  type: Boolean),
679
692
  FastlaneCore::ConfigItem.new(key: :unit_test,
680
- env_name: "MATCH_KEYSTORE_UNIT_TESTS",
693
+ env_name: "MATCH_KEYSTORE_UNIT_TESTS",
681
694
  description: "launch Unit Tests (false by default)",
682
- optional: true,
683
- type: Boolean)
695
+ optional: true,
696
+ type: Boolean)
684
697
  ]
685
698
  end
686
699
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module MatchKeystore
3
- VERSION = "0.1.17"
3
+ VERSION = "0.1.18"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-match_keystore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher NEY
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-08 00:00:00.000000000 Z
11
+ date: 2020-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry