fastlane-plugin-match_keystore 0.1.17 → 0.1.18
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a109e0eb2a91578a04778376e7a615618e06a85e4b62f303bb05e02b17475d82
|
4
|
+
data.tar.gz: 1d1c7e90bded78f03eb4056e5a1789f06de6e47fa8b1c0d53eb70e2f5a7c224a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
693
|
+
env_name: "MATCH_KEYSTORE_UNIT_TESTS",
|
681
694
|
description: "launch Unit Tests (false by default)",
|
682
|
-
|
683
|
-
|
695
|
+
optional: true,
|
696
|
+
type: Boolean)
|
684
697
|
]
|
685
698
|
end
|
686
699
|
|
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.
|
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-
|
11
|
+
date: 2020-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|