7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/fastlane/plugin/react_native_release/actions/generate_android_keystore.rb', line 7
def self.run(params)
encrypt_in_repo = params[:encrypt_in_repo]
key = Helper::ReactNativeReleaseHelper::ANDROID_KEYSTORE_CRYPTEX_KEY
begin
existing_remote_key = other_action.cryptex(
type: "export",
key: key
)
rescue => ex
UI.message('no keystore found in repo. creating it.')
keystore = create_keystore_with_params(params)
message = 'Created keystore'
if encrypt_in_repo
encrypt_keystore(keystore)
message.concat(' and saved to repo.')
end
UI.success(message)
end
if (encrypt_in_repo && UI.confirm("This will overwrite your existing keystore! Are you sure?"))
keystore_path = create_keystore_with_params(params)
encrypt_keystore(keystore_path)
UI.success('Created keystore and saved to repo.')
elsif encrypt_in_repo
UI.abort_with_message!("Stepping away...")
else
create_keystore_with_params(params)
UI.success('Created keystore, but did not save it to the repo.')
end
end
|