fastlane-plugin-react_native_release 0.7.0 → 0.8.0
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 +4 -4
- data/lib/fastlane/plugin/react_native_release/actions/add_app_var.rb +10 -12
- data/lib/fastlane/plugin/react_native_release/actions/add_fastlane_var.rb +99 -0
- data/lib/fastlane/plugin/react_native_release/actions/create_changelog.rb +92 -0
- data/lib/fastlane/plugin/react_native_release/actions/decrypt_app_vars.rb +21 -10
- data/lib/fastlane/plugin/react_native_release/actions/decrypt_fastlane_vars.rb +39 -2
- data/lib/fastlane/plugin/react_native_release/actions/determine_release_from_commits.rb +61 -0
- data/lib/fastlane/plugin/react_native_release/actions/encrypt_app_vars.rb +14 -3
- data/lib/fastlane/plugin/react_native_release/actions/encrypt_fastlane_vars.rb +17 -2
- data/lib/fastlane/plugin/react_native_release/actions/tag_release.rb +65 -0
- data/lib/fastlane/plugin/react_native_release/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b8d333b98e735533f90b2cb2e443f0565756066be831850f3a981b6c4522228
|
4
|
+
data.tar.gz: b5ed1dda7f25ce3804805f150b871db2eaa90178b6c3c0bb1bbb8f812f0d406f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8ee11d162d5ef17168b9d39e882bbc5018036082cf9d4b70b090e66cd568183e620ec1eb7735c01275f9bd1d7a3c35d534dd9472c86fc55d8b4728d355d230c
|
7
|
+
data.tar.gz: 84658b6da50fa4f8bd13eb471201a611068874091891bf864106739314338db646d1cde5719fc8d0c8ba36e229b84953d0a097b2fd4b8dd3b8bf2a27582cfc6c
|
@@ -9,10 +9,11 @@ module Fastlane
|
|
9
9
|
namespace = params[:namespace]
|
10
10
|
key = params[:key]
|
11
11
|
value = params[:value]
|
12
|
+
skip_confirmation= params[:skip_confirmation]
|
12
13
|
cryptex_app_key = app_key_for(namespace)
|
13
14
|
existing_app_vars = {}
|
14
15
|
|
15
|
-
if !is_ci && !UI.confirm("This will add #{key}=#{value} to the #{cryptex_app_key} namespace in the encrypted context repo. Proceed?")
|
16
|
+
if !is_ci && !skip_confirmation && !UI.confirm("This will add #{key}=#{value} to the #{cryptex_app_key} namespace in the encrypted context repo. Proceed?")
|
16
17
|
UI.abort_with_message!("Stepping away...")
|
17
18
|
end
|
18
19
|
|
@@ -67,6 +68,13 @@ module Fastlane
|
|
67
68
|
env_name: "FL_ADD_APP_VAR_VALUE",
|
68
69
|
description: "Enter the ENV value",
|
69
70
|
type: String),
|
71
|
+
FastlaneCore::ConfigItem.new(key: :skip_confirmation,
|
72
|
+
env_name: "FL_ENCRYPT_APP_VARS_SKIP_CONFIRMATION", # The name of the environment variable
|
73
|
+
description: "Allows commands to be run from within CLI and skip the UI.message confirmation dialog", # a short description of this parameter
|
74
|
+
type: Boolean,
|
75
|
+
short_option:'s',
|
76
|
+
default_value: false,
|
77
|
+
optional: true),
|
70
78
|
]
|
71
79
|
end
|
72
80
|
|
@@ -80,19 +88,13 @@ module Fastlane
|
|
80
88
|
|
81
89
|
def self.authors
|
82
90
|
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
83
|
-
["cball", "isaiahgrey93"]
|
91
|
+
["cball", "isaiahgrey93","cmejet"]
|
84
92
|
end
|
85
93
|
|
86
94
|
def self.is_supported?(platform)
|
87
95
|
[:ios, :android].include?(platform)
|
88
96
|
end
|
89
97
|
|
90
|
-
# Returns a path for an env var. optionally namespaced
|
91
|
-
def self.env_path_for(namespace)
|
92
|
-
return default_env_path if namespace.strip.empty?
|
93
|
-
"#{default_env_path}.#{namespace}"
|
94
|
-
end
|
95
|
-
|
96
98
|
# Returns the app key for cryptex. optionally namespaced
|
97
99
|
def self.app_key_for(namespace)
|
98
100
|
default_app_key = Helper::ReactNativeReleaseHelper::APP_CRYPTEX_KEY
|
@@ -100,10 +102,6 @@ module Fastlane
|
|
100
102
|
|
101
103
|
"#{namespace}_#{default_app_key}"
|
102
104
|
end
|
103
|
-
|
104
|
-
def self.default_env_path
|
105
|
-
Helper::ReactNativeReleaseHelper::APP_ENV_PATH
|
106
|
-
end
|
107
105
|
end
|
108
106
|
end
|
109
107
|
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require 'fastlane/plugin/cryptex'
|
3
|
+
|
4
|
+
module Fastlane
|
5
|
+
module Actions
|
6
|
+
class AddFastlaneVarAction < Action
|
7
|
+
def self.run(params)
|
8
|
+
is_ci = ENV['CI'] === 'true'
|
9
|
+
cryptex_key = Helper::ReactNativeReleaseHelper::FASTLANE_CRYPTEX_KEY
|
10
|
+
|
11
|
+
key = params[:key]
|
12
|
+
value = params[:value]
|
13
|
+
existing_app_vars = {}
|
14
|
+
|
15
|
+
if !is_ci && !UI.confirm("This will add #{key}=#{value} to the #{cryptex_key} namespace in the encrypted context repo. Proceed?")
|
16
|
+
UI.abort_with_message!("Stepping away...")
|
17
|
+
end
|
18
|
+
|
19
|
+
begin
|
20
|
+
existing_vars = other_action.cryptex(
|
21
|
+
type: 'export_env',
|
22
|
+
key: cryptex_key
|
23
|
+
)
|
24
|
+
rescue => ex
|
25
|
+
# If key doesn't exist cryptex will error
|
26
|
+
end
|
27
|
+
|
28
|
+
other_action.cryptex(
|
29
|
+
type: "import_env",
|
30
|
+
key: cryptex_key,
|
31
|
+
hash: existing_vars.merge({ key => value })
|
32
|
+
)
|
33
|
+
|
34
|
+
UI.success('Encrypted fastlane ENV vars')
|
35
|
+
end
|
36
|
+
|
37
|
+
#####################################################
|
38
|
+
# @!group Documentation
|
39
|
+
#####################################################
|
40
|
+
|
41
|
+
def self.description
|
42
|
+
"Adds a single ENV var for fastlane to the encrypted repository"
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.details
|
46
|
+
# Optional:
|
47
|
+
# this is your chance to provide a more detailed description of this action
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.available_options
|
51
|
+
[
|
52
|
+
FastlaneCore::ConfigItem.new(key: :key,
|
53
|
+
env_name: "FL_ADD_APP_VAR_KEY",
|
54
|
+
description: "Enter the ENV name",
|
55
|
+
type: String),
|
56
|
+
FastlaneCore::ConfigItem.new(key: :value,
|
57
|
+
env_name: "FL_ADD_APP_VAR_VALUE",
|
58
|
+
description: "Enter the ENV value",
|
59
|
+
type: String),
|
60
|
+
]
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.return_value
|
64
|
+
# If your method provides a return value, you can describe here what it does
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.details
|
68
|
+
# "Saves the current vars in android/fastlane/.env and ios/fastlane/.env"
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.authors
|
72
|
+
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
73
|
+
["cball", "isaiahgrey93"]
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.is_supported?(platform)
|
77
|
+
[:ios, :android].include?(platform)
|
78
|
+
end
|
79
|
+
|
80
|
+
# Returns a path for an env var. optionally namespaced
|
81
|
+
def self.env_path_for(namespace)
|
82
|
+
return default_env_path if namespace.strip.empty?
|
83
|
+
"#{default_env_path}.#{namespace}"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Returns the app key for cryptex. optionally namespaced
|
87
|
+
def self.app_key_for(namespace)
|
88
|
+
default_app_key = Helper::ReactNativeReleaseHelper::APP_CRYPTEX_KEY
|
89
|
+
return default_app_key if namespace.strip.empty?
|
90
|
+
|
91
|
+
"#{namespace}_#{default_app_key}"
|
92
|
+
end
|
93
|
+
|
94
|
+
def self.default_env_path
|
95
|
+
Helper::ReactNativeReleaseHelper::APP_ENV_PATH
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module Actions
|
5
|
+
class CreateChangelogAction < Action
|
6
|
+
def self.run(params)
|
7
|
+
title = params[:title]
|
8
|
+
commit_message = params[:commit_message]
|
9
|
+
# Determine our local branch name, set the upstream, and pull.
|
10
|
+
# We need to pull since another build may have already finished and created a changelog
|
11
|
+
local_branch ||= other_action.git_branch.gsub(/origin/, '')
|
12
|
+
sh("git branch --set-upstream-to=origin/#{local_branch} #{local_branch}")
|
13
|
+
other_action.git_pull
|
14
|
+
|
15
|
+
# Get release notes since last version
|
16
|
+
# This exports a slack and a regular markdown format
|
17
|
+
notes = other_action.conventional_changelog(title: title, format: 'slack')
|
18
|
+
notesMD = other_action.conventional_changelog(title: title, format: 'markdown')
|
19
|
+
|
20
|
+
# Prepend new Changelog to existing one
|
21
|
+
UI.message("pre-pending to CHANGELOG")
|
22
|
+
UI.message(notes)
|
23
|
+
new_file = '../CHANGELOG.md.new'
|
24
|
+
original_file = '../CHANGELOG.md'
|
25
|
+
|
26
|
+
open(new_file, 'w') do |nf|
|
27
|
+
notesMD.split("\n").each { |line| nf.puts line }
|
28
|
+
nf.puts "\n"
|
29
|
+
|
30
|
+
File.foreach(original_file) do |li|
|
31
|
+
nf.puts li
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
File.delete original_file
|
36
|
+
File.rename new_file, original_file
|
37
|
+
|
38
|
+
# Commit it
|
39
|
+
other_action.git_commit(
|
40
|
+
path: [File.join(Dir.pwd, original_file)],
|
41
|
+
message: commit_message,
|
42
|
+
skip_git_hooks: true
|
43
|
+
)
|
44
|
+
|
45
|
+
{ plain: notes, markdown: notesMD }
|
46
|
+
end
|
47
|
+
|
48
|
+
#####################################################
|
49
|
+
# @!group documentation
|
50
|
+
#####################################################
|
51
|
+
|
52
|
+
def self.description
|
53
|
+
"Determines if a release should happen based on conventional commits."
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.details
|
57
|
+
"If using conventional commits, only continues to release if there are features / fixes."
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.available_options
|
61
|
+
[
|
62
|
+
FastlaneCore::ConfigItem.new(key: :title,
|
63
|
+
env_name: "FL_CREATE_CHANGELOG_TITLE",
|
64
|
+
description: "What title should we use for the CHANGELOG?",
|
65
|
+
type: String),
|
66
|
+
FastlaneCore::ConfigItem.new(key: :commit_message,
|
67
|
+
env_name: "FL_CREATE_CHANGELOG_COMMIT_MESSAGE",
|
68
|
+
description: "What should the commit message be?",
|
69
|
+
type: String,
|
70
|
+
default_value: "chore(changelog): Update CHANGELOG [skip ci]")
|
71
|
+
]
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.return_value
|
75
|
+
# If your method provides a return value, you can describe here what it does
|
76
|
+
end
|
77
|
+
|
78
|
+
def self.details
|
79
|
+
# "Saves the current vars in android/fastlane/.env and ios/fastlane/.env"
|
80
|
+
end
|
81
|
+
|
82
|
+
def self.authors
|
83
|
+
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
84
|
+
["cball"]
|
85
|
+
end
|
86
|
+
|
87
|
+
def self.is_supported?(platform)
|
88
|
+
[:ios, :android].include?(platform)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -8,19 +8,23 @@ module Fastlane
|
|
8
8
|
is_ci = ENV['CI'] === 'true'
|
9
9
|
namespace = params[:namespace]
|
10
10
|
write_env = params[:write_env]
|
11
|
+
skip_confirmation= params[:skip_confirmation]
|
11
12
|
default_cryptex_app_key = Helper::ReactNativeReleaseHelper::APP_CRYPTEX_KEY
|
12
13
|
cryptex_app_key = Helper::ReactNativeReleaseHelper.app_key_for(namespace)
|
13
14
|
is_same_key = default_cryptex_app_key == cryptex_app_key
|
14
15
|
message = ''
|
15
16
|
|
16
|
-
if
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
if(!skip_confirmation)
|
18
|
+
if is_same_key
|
19
|
+
message = "This will decrypt values from #{cryptex_app_key}. Proceed?"
|
20
|
+
else
|
21
|
+
message = "This will decrypt and merge values from #{cryptex_app_key} into #{default_cryptex_app_key}. Proceed?"
|
22
|
+
end
|
23
|
+
|
21
24
|
|
22
|
-
|
23
|
-
|
25
|
+
if !is_ci && !UI.confirm(message)
|
26
|
+
UI.abort_with_message!("Stepping away...")
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
26
30
|
app_vars = other_action.cryptex(
|
@@ -35,7 +39,7 @@ module Fastlane
|
|
35
39
|
|
36
40
|
merged_vars = app_vars.merge(namespaced_vars)
|
37
41
|
has_env_file = File.exists?(Helper::ReactNativeReleaseHelper::APP_ENV_PATH)
|
38
|
-
should_write_env = write_env && (is_ci || !has_env_file || UI.confirm("It looks like you already have an .env file. Overwrite it?"))
|
42
|
+
should_write_env = write_env && (is_ci || skip_confirmation || !has_env_file || UI.confirm("It looks like you already have an .env file. Overwrite it?"))
|
39
43
|
|
40
44
|
# write an env file with the merged values
|
41
45
|
if (should_write_env)
|
@@ -81,7 +85,14 @@ module Fastlane
|
|
81
85
|
env_name: "FL_DECRYPT_APP_VARS_WRITE_ENV", # The name of the environment variable
|
82
86
|
description: "If we should write an .env file", # a short description of this parameter
|
83
87
|
type: Boolean,
|
84
|
-
default_value: true)
|
88
|
+
default_value: true),
|
89
|
+
FastlaneCore::ConfigItem.new(key: :skip_confirmation,
|
90
|
+
env_name: "FL_ENCRYPT_APP_VARS_SKIP_CONFIRMATION", # The name of the environment variable
|
91
|
+
description: "Allows commands to be run from within CLI and skip the UI.message confirmation dialog", # a short description of this parameter
|
92
|
+
type: Boolean,
|
93
|
+
short_option:'s',
|
94
|
+
default_value: false,
|
95
|
+
optional: true)
|
85
96
|
]
|
86
97
|
end
|
87
98
|
|
@@ -95,7 +106,7 @@ module Fastlane
|
|
95
106
|
|
96
107
|
def self.authors
|
97
108
|
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
98
|
-
["cball", "isaiahgrey93"]
|
109
|
+
["cball", "isaiahgrey93", "cmejet"]
|
99
110
|
end
|
100
111
|
|
101
112
|
def self.is_supported?(platform)
|
@@ -6,14 +6,46 @@ module Fastlane
|
|
6
6
|
class DecryptFastlaneVarsAction < Action
|
7
7
|
def self.run(params)
|
8
8
|
|
9
|
+
is_ci = ENV['CI'] === 'true'
|
10
|
+
write_env = params[:write_env]
|
11
|
+
|
9
12
|
env = other_action.cryptex(
|
10
13
|
type: "export_env",
|
11
14
|
key: Helper::ReactNativeReleaseHelper::FASTLANE_CRYPTEX_KEY,
|
12
15
|
set_env: params[:set_env]
|
13
16
|
)
|
14
17
|
|
15
|
-
|
16
|
-
|
18
|
+
should_write_env = write_env && !is_ci
|
19
|
+
|
20
|
+
|
21
|
+
UI.success('Successfully decrypted fastlane vars.')
|
22
|
+
|
23
|
+
# write fastlane env files
|
24
|
+
if (should_write_env)
|
25
|
+
|
26
|
+
UI.success('Writing fastlane vars to <root>/fastlane/.env.')
|
27
|
+
|
28
|
+
open('./fastlane/.env', 'w') do |f|
|
29
|
+
env.each {|key, value| f.puts "#{key}=#{value}" }
|
30
|
+
end
|
31
|
+
|
32
|
+
UI.success('Writing fastlane vars to <root>/ios/fastlane/.env.')
|
33
|
+
|
34
|
+
open('./ios/fastlane/.env', 'w') do |f|
|
35
|
+
env.each {|key, value| f.puts "#{key}=#{value}" }
|
36
|
+
end
|
37
|
+
|
38
|
+
UI.success('Writing fastlane vars to <root>/android/fastlane/.env.')
|
39
|
+
|
40
|
+
open('./android/fastlane/.env', 'w') do |f|
|
41
|
+
env.each {|key, value| f.puts "#{key}=#{value}" }
|
42
|
+
end
|
43
|
+
|
44
|
+
UI.success('Fastlane .env files were successfully written.')
|
45
|
+
else
|
46
|
+
UI.success('Fastlane .env not generated.')
|
47
|
+
end
|
48
|
+
|
17
49
|
env
|
18
50
|
end
|
19
51
|
|
@@ -39,6 +71,11 @@ module Fastlane
|
|
39
71
|
env_name: "FL_DECRYPT_FASTLANE_VARS_SET_ENV", # The name of the environment variable
|
40
72
|
description: "Sets the decrypted values in env", # a short description of this parameter
|
41
73
|
type: Boolean,
|
74
|
+
default_value: true),
|
75
|
+
FastlaneCore::ConfigItem.new(key: :write_env,
|
76
|
+
env_name: "FL_DECRYPT_FASTLANE_VARS_WRITE_ENV", # The name of the environment variable
|
77
|
+
description: "If we should write fastlane .env files", # a short description of this parameter
|
78
|
+
type: Boolean,
|
42
79
|
default_value: true)
|
43
80
|
]
|
44
81
|
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module Actions
|
5
|
+
class DetermineReleaseFromCommitsAction < Action
|
6
|
+
VALID_PLATFORMS = %w{ios android}
|
7
|
+
|
8
|
+
def self.run(params)
|
9
|
+
ignore_scopes = params[:commit_ignore_scopes]
|
10
|
+
tag_prefix = params[:tag_prefix]
|
11
|
+
is_releaseable = analyze_commits(match: "#{tag_prefix}*", ignore_scopes: ignore_scopes)
|
12
|
+
next_version = lane_context[SharedValues::RELEASE_NEXT_VERSION]
|
13
|
+
# next unless is_releaseable
|
14
|
+
|
15
|
+
next_version
|
16
|
+
end
|
17
|
+
|
18
|
+
#####################################################
|
19
|
+
# @!group Documentation
|
20
|
+
#####################################################
|
21
|
+
|
22
|
+
def self.description
|
23
|
+
"Determines if a release should happen based on conventional commits."
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.details
|
27
|
+
"If using conventional commits, only continues to release if there are features / fixes."
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.available_options
|
31
|
+
[
|
32
|
+
FastlaneCore::ConfigItem.new(key: :commit_ignore_scopes,
|
33
|
+
env_name: "FL_DETERMINE_RELEASE_FROM_COMMITS_COMMIT_IGNORE_SCOPES",
|
34
|
+
description: "What scopes from commits should be ignored?",
|
35
|
+
type: String),
|
36
|
+
FastlaneCore::ConfigItem.new(key: :tag_prefix,
|
37
|
+
env_name: "FL_DETERMINE_RELEASE_FROM_COMMITS_TAG_PREFIX",
|
38
|
+
description: "The tag prefix to use (ex. ios/beta)",
|
39
|
+
type: String)
|
40
|
+
]
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.return_value
|
44
|
+
# If your method provides a return value, you can describe here what it does
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.details
|
48
|
+
# "Saves the current vars in android/fastlane/.env and ios/fastlane/.env"
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.authors
|
52
|
+
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
53
|
+
["cball"]
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.is_supported?(platform)
|
57
|
+
[:ios, :android].include?(platform)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -8,13 +8,17 @@ module Fastlane
|
|
8
8
|
namespace = params[:namespace]
|
9
9
|
cryptex_app_key = app_key_for(namespace)
|
10
10
|
env_path = params[:env_path] || env_path_for(namespace)
|
11
|
+
skip_confirmation= params[:skip_confirmation]
|
11
12
|
|
13
|
+
|
12
14
|
if !File.exists?(env_path)
|
13
15
|
UI.user_error!("#{env_path} not found!")
|
14
16
|
end
|
15
17
|
|
16
|
-
if
|
17
|
-
UI.
|
18
|
+
if(!skip_confirmation)
|
19
|
+
if !UI.confirm("This will save values from #{env_path} to the #{cryptex_app_key} namespace in the encrypted context repo. Proceed?")
|
20
|
+
UI.abort_with_message!("Stepping away...")
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
app_vars = Dotenv.parse(env_path)
|
@@ -67,7 +71,14 @@ module Fastlane
|
|
67
71
|
env_name: "FL_ENCRYPT_APP_VARS_ENV_PATH", # The name of the environment variable
|
68
72
|
description: "A path to an ENV file that contains app related ENV vars", # a short description of this parameter
|
69
73
|
type: String,
|
70
|
-
optional: true)
|
74
|
+
optional: true),
|
75
|
+
FastlaneCore::ConfigItem.new(key: :skip_confirmation,
|
76
|
+
env_name: "FL_ENCRYPT_APP_VARS_SKIP_CONFIRMATION", # The name of the environment variable
|
77
|
+
description: "Allows commands to be run from within CLI and skip the UI.message confirmation dialog", # a short description of this parameter
|
78
|
+
type: Boolean,
|
79
|
+
short_option:'s',
|
80
|
+
default_value: false,
|
81
|
+
optional: true),
|
71
82
|
]
|
72
83
|
end
|
73
84
|
|
@@ -9,6 +9,8 @@ module Fastlane
|
|
9
9
|
FASTLANE_CRYPTEX_KEY = 'fastlane_vars'
|
10
10
|
|
11
11
|
def self.run(params)
|
12
|
+
skip_confirmation= params[:skip_confirmation]
|
13
|
+
|
12
14
|
if !File.exists?(IOS_ENV_PATH)
|
13
15
|
UI.user_error!("No .env found in ios directory!")
|
14
16
|
end
|
@@ -17,7 +19,8 @@ module Fastlane
|
|
17
19
|
UI.user_error!("No .env found in Android directory")
|
18
20
|
end
|
19
21
|
|
20
|
-
|
22
|
+
|
23
|
+
if !skip_confirmation && !UI.confirm("This will save values from your #{IOS_ENV_PATH} and #{ANDROID_ENV_PATH} to the encrypted context repo. Proceed?")
|
21
24
|
UI.abort_with_message!("Stepping away...")
|
22
25
|
end
|
23
26
|
|
@@ -37,9 +40,21 @@ module Fastlane
|
|
37
40
|
def self.description
|
38
41
|
"Encrypt fastlane vars for CI"
|
39
42
|
end
|
43
|
+
|
44
|
+
def self.available_options
|
45
|
+
[
|
46
|
+
FastlaneCore::ConfigItem.new(key: :skip_confirmation,
|
47
|
+
env_name: "FL_ENCRYPT_APP_VARS_SKIP_CONFIRMATION", # The name of the environment variable
|
48
|
+
description: "Allows commands to be run from within CLI and skip the UI.message confirmation dialog", # a short description of this parameter
|
49
|
+
type: Boolean,
|
50
|
+
short_option:'s',
|
51
|
+
default_value: false,
|
52
|
+
optional: true),
|
53
|
+
]
|
54
|
+
end
|
40
55
|
|
41
56
|
def self.authors
|
42
|
-
["cball", "isaiahgrey93"]
|
57
|
+
["cball", "isaiahgrey93", "cmejet"]
|
43
58
|
end
|
44
59
|
|
45
60
|
def self.return_value
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module Actions
|
5
|
+
class TagReleaseAction < Action
|
6
|
+
def self.run(params)
|
7
|
+
tag_prefix = params[:tag_prefix]
|
8
|
+
next_version = params[:next_version]
|
9
|
+
build_number = params[:build_number]
|
10
|
+
|
11
|
+
# Create tag to represent the new version
|
12
|
+
# TODO handle the case of not having proper git permissions
|
13
|
+
other_action.add_git_tag(tag: "#{tag_prefix}/#{next_version}/#{build_number}")
|
14
|
+
other_action.push_git_tags
|
15
|
+
other_action.push_to_git_remote
|
16
|
+
end
|
17
|
+
|
18
|
+
#####################################################
|
19
|
+
# @!group documentation
|
20
|
+
#####################################################
|
21
|
+
|
22
|
+
def self.description
|
23
|
+
"Tags a release based on a prefix, version, and build numbers"
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.details
|
27
|
+
# TODO
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.available_options
|
31
|
+
[
|
32
|
+
FastlaneCore::ConfigItem.new(key: :tag_prefix,
|
33
|
+
env_name: "FL_TAG_RELEASE_TAG_PREFIX",
|
34
|
+
description: "The prefix for tags (ex. ios/beta, android/beta)",
|
35
|
+
type: String),
|
36
|
+
FastlaneCore::ConfigItem.new(key: :next_version,
|
37
|
+
env_name: "FL_TAG_RELEASE_NEXT_VERSION",
|
38
|
+
description: "The next version to release",
|
39
|
+
type: String),
|
40
|
+
FastlaneCore::ConfigItem.new(key: :build_number,
|
41
|
+
env_name: "FL_TAG_RELEASE_BUILD_NUMBER",
|
42
|
+
description: "The current build number from CI",
|
43
|
+
type: String)
|
44
|
+
]
|
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
|
+
# "Saves the current vars in android/fastlane/.env and ios/fastlane/.env"
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.authors
|
56
|
+
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
57
|
+
["cball"]
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.is_supported?(platform)
|
61
|
+
[:ios, :android].include?(platform)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
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.
|
4
|
+
version: 0.8.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: 2020-
|
11
|
+
date: 2020-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane-plugin-android_versioning
|
@@ -175,17 +175,21 @@ files:
|
|
175
175
|
- lib/fastlane/plugin/react_native_release.rb
|
176
176
|
- lib/fastlane/plugin/react_native_release/actions/accept_android_sdk_licenses.rb
|
177
177
|
- lib/fastlane/plugin/react_native_release/actions/add_app_var.rb
|
178
|
+
- lib/fastlane/plugin/react_native_release/actions/add_fastlane_var.rb
|
179
|
+
- lib/fastlane/plugin/react_native_release/actions/create_changelog.rb
|
178
180
|
- lib/fastlane/plugin/react_native_release/actions/create_fastlane_session.rb
|
179
181
|
- lib/fastlane/plugin/react_native_release/actions/decrypt_android_keystore.rb
|
180
182
|
- lib/fastlane/plugin/react_native_release/actions/decrypt_app_vars.rb
|
181
183
|
- lib/fastlane/plugin/react_native_release/actions/decrypt_fastlane_vars.rb
|
182
184
|
- lib/fastlane/plugin/react_native_release/actions/decrypt_google_play_credentials.rb
|
185
|
+
- lib/fastlane/plugin/react_native_release/actions/determine_release_from_commits.rb
|
183
186
|
- lib/fastlane/plugin/react_native_release/actions/encrypt_app_vars.rb
|
184
187
|
- lib/fastlane/plugin/react_native_release/actions/encrypt_fastlane_vars.rb
|
185
188
|
- lib/fastlane/plugin/react_native_release/actions/encrypt_google_play_credentials.rb
|
186
189
|
- lib/fastlane/plugin/react_native_release/actions/generate_android_keystore.rb
|
187
190
|
- lib/fastlane/plugin/react_native_release/actions/react_native_release.rb
|
188
191
|
- lib/fastlane/plugin/react_native_release/actions/read_fastlane_session.rb
|
192
|
+
- lib/fastlane/plugin/react_native_release/actions/tag_release.rb
|
189
193
|
- lib/fastlane/plugin/react_native_release/helper/react_native_release_helper.rb
|
190
194
|
- lib/fastlane/plugin/react_native_release/version.rb
|
191
195
|
homepage: https://github.com/echobind/fastlane-plugin-react_native_release
|