fastlane-plugin-react_native_release 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (20) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +118 -45
  3. data/lib/fastlane/plugin/react_native_release/actions/accept_android_sdk_licenses.rb +46 -0
  4. data/lib/fastlane/plugin/react_native_release/actions/add_app_var.rb +109 -0
  5. data/lib/fastlane/plugin/react_native_release/actions/create_fastlane_session.rb +75 -0
  6. data/lib/fastlane/plugin/react_native_release/actions/decrypt_android_keystore.rb +131 -0
  7. data/lib/fastlane/plugin/react_native_release/actions/decrypt_app_vars.rb +106 -0
  8. data/lib/fastlane/plugin/react_native_release/actions/decrypt_fastlane_vars.rb +64 -0
  9. data/lib/fastlane/plugin/react_native_release/actions/decrypt_google_play_credentials.rb +62 -0
  10. data/lib/fastlane/plugin/react_native_release/actions/encrypt_app_vars.rb +110 -0
  11. data/lib/fastlane/plugin/react_native_release/actions/encrypt_fastlane_vars.rb +61 -0
  12. data/lib/fastlane/plugin/react_native_release/actions/encrypt_google_play_credentials.rb +64 -0
  13. data/lib/fastlane/plugin/react_native_release/actions/generate_android_keystore.rb +137 -0
  14. data/lib/fastlane/plugin/react_native_release/actions/{react_native_release_action.rb → react_native_release.rb} +33 -31
  15. data/lib/fastlane/plugin/react_native_release/actions/read_fastlane_session.rb +55 -0
  16. data/lib/fastlane/plugin/react_native_release/helper/react_native_release_helper.rb +14 -5
  17. data/lib/fastlane/plugin/react_native_release/version.rb +1 -1
  18. metadata +16 -6
  19. data/lib/fastlane/plugin/react_native_release/actions/create_fastlane_session_action.rb +0 -63
  20. data/lib/fastlane/plugin/react_native_release/actions/read_fastlane_session_action.rb +0 -67
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module ReactNativeRelease
3
- VERSION = "0.6.0"
3
+ VERSION = "0.7.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-react_native_release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Ball
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-20 00:00:00.000000000 Z
11
+ date: 2020-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane-plugin-android_versioning
@@ -173,9 +173,19 @@ files:
173
173
  - LICENSE
174
174
  - README.md
175
175
  - lib/fastlane/plugin/react_native_release.rb
176
- - lib/fastlane/plugin/react_native_release/actions/create_fastlane_session_action.rb
177
- - lib/fastlane/plugin/react_native_release/actions/react_native_release_action.rb
178
- - lib/fastlane/plugin/react_native_release/actions/read_fastlane_session_action.rb
176
+ - lib/fastlane/plugin/react_native_release/actions/accept_android_sdk_licenses.rb
177
+ - lib/fastlane/plugin/react_native_release/actions/add_app_var.rb
178
+ - lib/fastlane/plugin/react_native_release/actions/create_fastlane_session.rb
179
+ - lib/fastlane/plugin/react_native_release/actions/decrypt_android_keystore.rb
180
+ - lib/fastlane/plugin/react_native_release/actions/decrypt_app_vars.rb
181
+ - lib/fastlane/plugin/react_native_release/actions/decrypt_fastlane_vars.rb
182
+ - lib/fastlane/plugin/react_native_release/actions/decrypt_google_play_credentials.rb
183
+ - lib/fastlane/plugin/react_native_release/actions/encrypt_app_vars.rb
184
+ - lib/fastlane/plugin/react_native_release/actions/encrypt_fastlane_vars.rb
185
+ - lib/fastlane/plugin/react_native_release/actions/encrypt_google_play_credentials.rb
186
+ - lib/fastlane/plugin/react_native_release/actions/generate_android_keystore.rb
187
+ - lib/fastlane/plugin/react_native_release/actions/react_native_release.rb
188
+ - lib/fastlane/plugin/react_native_release/actions/read_fastlane_session.rb
179
189
  - lib/fastlane/plugin/react_native_release/helper/react_native_release_helper.rb
180
190
  - lib/fastlane/plugin/react_native_release/version.rb
181
191
  homepage: https://github.com/echobind/fastlane-plugin-react_native_release
@@ -197,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
207
  - !ruby/object:Gem::Version
198
208
  version: '0'
199
209
  requirements: []
200
- rubygems_version: 3.0.3
210
+ rubygems_version: 3.0.6
201
211
  signing_key:
202
212
  specification_version: 4
203
213
  summary: Simplify releases for React Native apps.
@@ -1,63 +0,0 @@
1
- require 'fastlane/action'
2
- require_relative '../helper/react_native_release_helper'
3
-
4
- module Fastlane
5
- module Actions
6
- class CreateFastlaneSessionAction < Action
7
- def self.run(params)
8
- require 'fastlane/plugin/cryptex'
9
-
10
- fastlane_session_git_url = ENV["FASTLANE_ENV_GIT_URL"]
11
- fastlane_session_username = ENV["FASTLANE_ENV_USERNAME"]
12
- fastlane_session_password = ENV["CRYPTEX_PASSWORD"]
13
- fastlane_session_cookie_path = "#{File.expand_path('~')}/.fastlane/spaceship/#{fastlane_session_username}/cookie"
14
-
15
- if !fastlane_session_username
16
- UI.user_error!("No FASTLANE_ENV_USERNAME var at <root>/fastlane/.env\nFASTLANE_ENV_USERNAME is used to authenticate with the App Store for iOS releases.")
17
- elsif !fastlane_session_git_url
18
- UI.user_error!("No FASTLANE_ENV_GIT_URL var at <root>/fastlane/.env\nFASTLANE_ENV_GIT_URL is used to store the App Store Connect session to upload releases on CI.")
19
- elsif !fastlane_session_password
20
- UI.user_error!("No CRYPTEX_PASSWORD var at <root>/fastlane/.env\nCRYPTEX_PASSWORD is used to encrypt/decrypt the App Store Connect session.")
21
- else
22
- UI.message "Generating a new fastlane session."
23
-
24
- UI.message "Please enter the 6 digit 2FA code if one is sent to your device otherwise the script will continue automatically."
25
-
26
- `fastlane spaceauth -u #{fastlane_session_username.shellescape}`
27
-
28
- other_action.cryptex(
29
- type: "import",
30
- in: fastlane_session_cookie_path,
31
- key: "FASTLANE_SESSION",
32
- git_url: fastlane_session_git_url
33
- )
34
-
35
- UI.message "Uploaded FASTLANE_SESSION variable securely to git repository."
36
- end
37
- end
38
-
39
- def self.description
40
- "Simplify 2FA authentication for App Store Connect"
41
- end
42
-
43
- def self.authors
44
- ["cball", "isaiahgrey93"]
45
- end
46
-
47
- def self.return_value
48
- # If your method provides a return value, you can describe here what it does
49
- end
50
-
51
- def self.details
52
- "Creates a cookie for authenticating with App Store connecting. Handles generating, encrypting, and storing the cookie."
53
- end
54
-
55
- def self.is_supported?(platform)
56
- # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
57
- # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
58
- #
59
- [:ios, :android].include?(platform)
60
- end
61
- end
62
- end
63
- end
@@ -1,67 +0,0 @@
1
- require 'fastlane/action'
2
- require_relative '../helper/react_native_release_helper'
3
-
4
- module Fastlane
5
- module Actions
6
- class ReadFastlaneSessionAction < Action
7
- def self.run(params)
8
- require 'fastlane/plugin/cryptex'
9
-
10
- fastlane_session_git_url = ENV["FASTLANE_ENV_GIT_URL"]
11
- fastlane_session_username = ENV["FASTLANE_ENV_USERNAME"]
12
- fastlane_session_password = ENV["CRYPTEX_PASSWORD"]
13
-
14
- if !fastlane_session_username
15
- UI.user_error!("No FASTLANE_ENV_USERNAME var at <root>/fastlane/.env\nFASTLANE_ENV_USERNAME is used to authenticate with the App Store for iOS releases.")
16
- elsif !fastlane_session_git_url
17
- UI.user_error!("No FASTLANE_ENV_GIT_URL var at <root>/fastlane/.env\nFASTLANE_ENV_GIT_URL is used to store the App Store Connect session to upload releases on CI.")
18
- elsif !fastlane_session_password
19
- UI.user_error!("No CRYPTEX_PASSWORD var at <root>/fastlane/.env\nCRYPTEX_PASSWORD is used to encrypt/decrypt the App Store Connect session.")
20
- else
21
- UI.message "Reading fastlane session.."
22
-
23
- fastlane_session_cookie_path = Tempfile.new('')
24
-
25
- other_action.cryptex(
26
- type: "export",
27
- out: fastlane_session_cookie_path.path,
28
- key: "FASTLANE_SESSION",
29
- git_url: ENV["FASTLANE_ENV_GIT_URL"]
30
- )
31
-
32
- fastlane_session = (open fastlane_session_cookie_path.path).read
33
-
34
- UI.message fastlane_session_cookie_path.path
35
- UI.message fastlane_session
36
-
37
- ENV["FASTLANE_SESSION"] = fastlane_session
38
-
39
- UI.success "Read FASTLANE_SESSION from remote repository."
40
- end
41
- end
42
-
43
- def self.description
44
- "Simplify 2FA authentication for App Store Connect"
45
- end
46
-
47
- def self.authors
48
- ["cball", "isaiahgrey93"]
49
- end
50
-
51
- def self.return_value
52
- # If your method provides a return value, you can describe here what it does
53
- end
54
-
55
- def self.details
56
- "Fetches an encrypted cookie for authenticating with App Store connecting. Handles fetching and decrypting the cookie before setting to the local env."
57
- end
58
-
59
- def self.is_supported?(platform)
60
- # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
61
- # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
62
- #
63
- [:ios, :android].include?(platform)
64
- end
65
- end
66
- end
67
- end