fastlane-plugin-react_native_release 0.3.0 → 0.4.0

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: 1c6db2dcb8566ef24876fd189f29f38cd3cbecdd59c8ce89e7df399b10e6902c
4
- data.tar.gz: 2626f9f632f1fa7deaa98ec880171692c3c05db8bea3bc1fe70bed115cad312b
3
+ metadata.gz: 693da95436e682f5233e4ea491c6e8432aa7f10c6e5b0fa9f2b23a506c1747e5
4
+ data.tar.gz: 40783862e8e508483b2cabb6e93a1b33d12459f4150bffab15e641b9aeee8f98
5
5
  SHA512:
6
- metadata.gz: bf7a63f2298aa414a703ad735465802f4268e2d3f0c7e2f5023d96338447c811b88f8bd68ca26d67a8b5a274054ee4c12baa9021d237d9c9b706842951e375fb
7
- data.tar.gz: da7e7e339c2e834d17d829db5f4e5df449c1fb1c52b6d5b5cf0e5c039f7c510efb47550fd326210a76afad6221958fa4022ab605af98edb91dd4e4176d3f9dda
6
+ metadata.gz: 87773a38a7f687c56d21336ce497446d77b49d42ced974affe5df64b0b5b126fbeddbba0a12f23938a266e2341220388374952c2d59db15699f42815a39bc722
7
+ data.tar.gz: ab68b057b194da0573a44151a2bbc2f397475aeb6f4a0533896b096cced172c3ae7fcca2b81226fb559db960210b1ab5e38f79463399ac0ffc5cad6392ed369f
data/README.md CHANGED
@@ -33,19 +33,10 @@ To enable the fastlane session add an `.env` file at `<root>/fastlane/.env` with
33
33
  |-----|------|-------------|
34
34
  | FASTLANE_ENV_GIT_URL | String | The repository where the hashed session token will be stored. **Ensure this repository before running the release script!** (Must be a separate repository solely for securely storing the session token). |
35
35
  | FASTLANE_ENV_USERNAME | String | The Apple Developer Account email to authenticate with 2FA and generate a session token for. |
36
+ | CRYPTEX_PASSWORD | String | The secret key used to encrypt/decrypt the `FASTLANE_SESSION` value. |
36
37
 
37
- Note: Apple requires 2FA on all accounts now and the IOS build steps will fail if you attempt to upload to TestFlight or AppStore Connect without a session token.
38
-
39
- #### Important!
40
-
41
- Before running the release script, we will need to authenticate locally and generate an initial token to store credentials in the keychain to be used in the release script.
42
-
43
- 1. Using the same *Apple Developer Account* (`FASTLANE_ENV_USERNAME`) in the `<root>/fastlane/.env` authenticate on [AppStore Connect](https://appstoreconnect.apple.com/login).
44
-
45
- 2. Then run `fastlane spaceauth -u {YOUR FASTLANE_ENV_USERNAME}`, enter your Apple Developer Account password and complete the 2FA code if prompted.
46
-
47
- These steps are required for every machine, otherwise the release script will fail.
48
38
 
39
+ Note: Apple requires 2FA on all accounts now and the IOS build steps will fail if you attempt to upload to TestFlight or AppStore Connect without a session token.
49
40
 
50
41
  ## About React Native Release
51
42
 
@@ -9,9 +9,7 @@ module Fastlane
9
9
  def self.run(params)
10
10
  require 'fastlane/plugin/android_versioning'
11
11
 
12
- if UI.select("Generate a fastlane session token? (The session token is used to authenticate with the App Store to upload iOS releases.)", ["yes", "no"]) === 'yes'
13
- create_fastlane_session
14
- end
12
+ create_fastlane_session
15
13
 
16
14
  target = UI.select "Select a release type:", VALID_TARGETS
17
15
  is_beta = target.include?('beta')
@@ -129,24 +127,25 @@ module Fastlane
129
127
 
130
128
  UI.message "Generating a new FASTLANE_SESSION."
131
129
 
132
- file = Tempfile.new('')
133
-
134
130
  fastlane_session_git_url = ENV["FASTLANE_ENV_GIT_URL"]
135
131
  fastlane_session_username = ENV["FASTLANE_ENV_USERNAME"]
136
132
 
133
+ spaceship_cookie_path = "#{File.expand_path('~')}/.fastlane/spaceship/#{fastlane_session_username}/cookie"
134
+
135
+ if File.exists?(spaceship_cookie_path)
136
+ system `rm #{spaceship_cookie_path}`
137
+ end
138
+
137
139
  if !fastlane_session_username;
138
140
  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.")
139
141
  elsif !fastlane_session_git_url;
140
142
  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.")
141
143
  else
142
- system "yes | fastlane spaceauth -u #{fastlane_session_username}"
143
- system "pbpaste > #{file.path}"
144
+ system "fastlane spaceauth -u #{fastlane_session_username}";
144
145
 
145
- UI.message "File created at: #{file.path}"
146
-
147
146
  other_action.cryptex(
148
147
  type: "import",
149
- in: file.path,
148
+ in: spaceship_cookie_path,
150
149
  key: "FASTLANE_SESSION",
151
150
  git_url: fastlane_session_git_url
152
151
  )
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module ReactNativeRelease
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.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.3.0
4
+ version: 0.4.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-06-13 00:00:00.000000000 Z
11
+ date: 2019-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane-plugin-android_versioning