fastlane-plugin-apadmi_grout 0.0.2 → 1.2.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/CHANGELOG.md +7 -3
- data/lib/fastlane/plugin/apadmi_grout/actions/build_ipa_action.rb +98 -0
- data/lib/fastlane/plugin/apadmi_grout/actions/find_tickets_to_move_action.rb +14 -2
- data/lib/fastlane/plugin/apadmi_grout/actions/generate_release_notes_action.rb +14 -2
- data/lib/fastlane/plugin/apadmi_grout/actions/get_deployment_target_action.rb +69 -0
- data/lib/fastlane/plugin/apadmi_grout/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac24d03d0373738dffc98532e4b3ea50ee479995a70aeb3e40d2d1593c10ff25
|
4
|
+
data.tar.gz: 480f7215601eb77112b327065db85bf5aab1501ea468ca3b5ea6832e451c000c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad61c7daca59c15050a638dd832002d164162eb5f496b2a9052a6dc03a6bff3c9911f52b5e6ee16415a43234222cbc47ccab95f4cc5b4841a4a3cff6bba3b5a3
|
7
|
+
data.tar.gz: dacd6738d17ed4fc07505faeedf2d4d21cb3e21314164c38b4594a3b6f6a4d1dbc7d0326ae77c4f852cd152bc81558ba7dfcd940423d2fe11ca347e44e1b6990
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
# Fastlane Plugin Changelog
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [1.2.0] - 2022-05-17
|
4
|
+
* Automatically save generated release notes to a file on disk.
|
4
5
|
|
5
|
-
## [
|
6
|
+
## [1.1.0] - 2022-05-12
|
7
|
+
* Support allowing tickets that aren't assigned to a sprint to be moved.
|
8
|
+
* Create action for obtaining iOS deployment target
|
6
9
|
|
7
|
-
- Initial release
|
10
|
+
## [1.0.0] - 2022-05-09 - Initial release
|
11
|
+
* Fastlane wrappers for new core functionality
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "fastlane/action"
|
4
|
+
require "apadmi_grout"
|
5
|
+
require "gym"
|
6
|
+
require_relative "../utils/fastlane_logger"
|
7
|
+
|
8
|
+
# WARNING: Since this is calling out to Gym, this isn't covered at all by tests
|
9
|
+
# Be very very careful before making any changes.
|
10
|
+
module Fastlane
|
11
|
+
module Actions
|
12
|
+
# Build an IPA binary
|
13
|
+
class BuildIpaAction < Action
|
14
|
+
def self.run(params)
|
15
|
+
logger = FastLane::FastlaneLogger.new
|
16
|
+
|
17
|
+
output_name = params[:output_name] || Apadmi::Grout::FilenameUtils.binary_output_filename(
|
18
|
+
client_name: params[:client_name],
|
19
|
+
product_name: params[:product_name],
|
20
|
+
platform: "iOS",
|
21
|
+
version: params[:version],
|
22
|
+
build_number: params[:build_number],
|
23
|
+
suffix: params[:suffix]
|
24
|
+
)
|
25
|
+
|
26
|
+
logger.message("Generating IPA: #{output_name}.ipa")
|
27
|
+
new_params = params
|
28
|
+
new_params[:output_name] = output_name
|
29
|
+
|
30
|
+
# Output dir being "." is the gym default, so overwrite this
|
31
|
+
if params[:output_directory].empty? || params[:output_directory] == "."
|
32
|
+
new_params[:output_directory] = ENV["BITRISE_DEPLOY_DIR"] || "#{Apadmi::Grout::GitUtils.git_root}/build"
|
33
|
+
end
|
34
|
+
|
35
|
+
result = Fastlane::Actions::GymAction.run(new_params)
|
36
|
+
|
37
|
+
logger.success("Generated #{output_name}.ipa in #{result}")
|
38
|
+
result
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.description
|
42
|
+
"Builds an IPA"
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.authors
|
46
|
+
["samdc@apadmi.com"]
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.available_options
|
50
|
+
[
|
51
|
+
FastlaneCore::ConfigItem.new(key: :client_name,
|
52
|
+
description: "The name of the ipa's client",
|
53
|
+
env_name: "CLIENT_NAME",
|
54
|
+
type: String,
|
55
|
+
verify_block: proc do |value|
|
56
|
+
UI.user_error!("Didn't pass a valid client name") unless value
|
57
|
+
end,
|
58
|
+
optional: false),
|
59
|
+
FastlaneCore::ConfigItem.new(key: :product_name,
|
60
|
+
description: "The name of the product",
|
61
|
+
env_name: "PRODUCT_NAME",
|
62
|
+
type: String,
|
63
|
+
verify_block: proc do |value|
|
64
|
+
UI.user_error!("Didn't pass a valid product name") unless value
|
65
|
+
end,
|
66
|
+
optional: false),
|
67
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
68
|
+
description: "The app version e.g. 0.1.0",
|
69
|
+
type: String,
|
70
|
+
verify_block: proc do |value|
|
71
|
+
UI.user_error!("Didn't pass a valid version name") unless value
|
72
|
+
end,
|
73
|
+
optional: false),
|
74
|
+
FastlaneCore::ConfigItem.new(key: :build_number,
|
75
|
+
description: "The app build number e.g. 3948",
|
76
|
+
default_value: Apadmi::Grout::GitUtils.number_of_commits,
|
77
|
+
type: String,
|
78
|
+
verify_block: proc do |value|
|
79
|
+
UI.user_error!("Didn't pass a valid build number") unless value
|
80
|
+
end,
|
81
|
+
optional: false),
|
82
|
+
FastlaneCore::ConfigItem.new(key: :suffix,
|
83
|
+
description: "Suffix to identify what this output is (e.g. SOURCE, UAT, QA, DEV)",
|
84
|
+
type: String,
|
85
|
+
default_value: "",
|
86
|
+
verify_block: proc do |value|
|
87
|
+
UI.user_error!("Didn't pass a valid suffix") unless value
|
88
|
+
end,
|
89
|
+
optional: false)
|
90
|
+
] + Gym::Options.available_options
|
91
|
+
end
|
92
|
+
|
93
|
+
def self.is_supported?(platform)
|
94
|
+
platform == :ios
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -24,7 +24,9 @@ module Fastlane
|
|
24
24
|
build_tools.find_tickets_to_move_action.run(
|
25
25
|
params[:jira_component_name],
|
26
26
|
params[:jira_status_from],
|
27
|
-
[]
|
27
|
+
[],
|
28
|
+
params[:custom_flag_messages],
|
29
|
+
params[:options]
|
28
30
|
)
|
29
31
|
end
|
30
32
|
|
@@ -94,7 +96,17 @@ module Fastlane
|
|
94
96
|
verify_block: proc do |value|
|
95
97
|
UI.user_error!("Didn't pass a valid JIRA status") unless value
|
96
98
|
end,
|
97
|
-
optional: false)
|
99
|
+
optional: false),
|
100
|
+
FastlaneCore::ConfigItem.new(key: :custom_flag_messages,
|
101
|
+
description: "Custom messages to use when flagging tickets",
|
102
|
+
type: Apadmi::Grout::FlagMessages,
|
103
|
+
default_value: nil,
|
104
|
+
optional: true),
|
105
|
+
FastlaneCore::ConfigItem.new(key: :options,
|
106
|
+
description: "Additional options to customize search",
|
107
|
+
type: Apadmi::Grout::FindTicketsOptions,
|
108
|
+
default_value: nil,
|
109
|
+
optional: true)
|
98
110
|
]
|
99
111
|
end
|
100
112
|
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require "fastlane/action"
|
4
4
|
require "apadmi_grout"
|
5
5
|
require_relative "../utils/fastlane_logger"
|
6
|
+
require "fileutils"
|
6
7
|
|
7
8
|
module Fastlane
|
8
9
|
module Actions
|
@@ -43,7 +44,14 @@ module Fastlane
|
|
43
44
|
)
|
44
45
|
|
45
46
|
logger.message("Generating Release Notes")
|
46
|
-
build_tools.generate_release_notes_action.run(config)
|
47
|
+
release_notes = build_tools.generate_release_notes_action.run(config)
|
48
|
+
|
49
|
+
FileUtils.mkdir_p(params[:output_dir])
|
50
|
+
file_name = "#{params[:output_dir]}/#{params[:release_notes_title]}-#{params[:app_version]}.md"
|
51
|
+
|
52
|
+
File.write(file_name, release_notes)
|
53
|
+
logger.success("Saved Release Notes to #{file_name}")
|
54
|
+
[release_notes, file_name]
|
47
55
|
end
|
48
56
|
|
49
57
|
def self.description
|
@@ -163,7 +171,11 @@ module Fastlane
|
|
163
171
|
FastlaneCore::ConfigItem.new(key: :templates,
|
164
172
|
description: "Release notes templates",
|
165
173
|
default_value: Apadmi::Grout::Templates.default,
|
166
|
-
type: Apadmi::Grout::Templates)
|
174
|
+
type: Apadmi::Grout::Templates),
|
175
|
+
FastlaneCore::ConfigItem.new(key: :output_dir,
|
176
|
+
description: "Directory in which to save the release notes file",
|
177
|
+
default_value: ENV["BITRISE_DEPLOY_DIR"] || "#{Apadmi::Grout::GitUtils.git_root}/build",
|
178
|
+
type: String)
|
167
179
|
]
|
168
180
|
end
|
169
181
|
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "fastlane/action"
|
4
|
+
require "apadmi_grout"
|
5
|
+
require_relative "../utils/fastlane_logger"
|
6
|
+
|
7
|
+
# WARNING: Since this is calling out to Gym, this isn't covered at all by tests
|
8
|
+
# Be very very careful before making any changes.
|
9
|
+
module Fastlane
|
10
|
+
module Actions
|
11
|
+
# Build an IPA binary
|
12
|
+
class GetDeploymentTargetAction < Action
|
13
|
+
def self.run(params)
|
14
|
+
logger = FastLane::FastlaneLogger.new
|
15
|
+
|
16
|
+
configuration = params[:configuration]
|
17
|
+
project = Fastlane::Actions::GetVersionNumberAction.get_project!(
|
18
|
+
params[:xcodeproj_path_or_dir]
|
19
|
+
)
|
20
|
+
|
21
|
+
logger.message("Searching for target #{params[:target]} in #{params[:xcodeproj_path_or_dir]}")
|
22
|
+
target = Fastlane::Actions::GetVersionNumberAction.get_target!(
|
23
|
+
project,
|
24
|
+
params[:target]
|
25
|
+
)
|
26
|
+
|
27
|
+
target.build_configurations.each do |config|
|
28
|
+
next unless configuration.nil? || config.name == configuration
|
29
|
+
|
30
|
+
value = config.resolve_build_setting("IPHONEOS_DEPLOYMENT_TARGET")
|
31
|
+
return value unless value.blank?
|
32
|
+
end
|
33
|
+
|
34
|
+
raise "Could not find deployment target for #{params[:xcodeproj_path_or_dir]} and #{params[:target]}"
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.description
|
38
|
+
"Pulls the deployment target from the XCode project"
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.authors
|
42
|
+
["samdc@apadmi.com"]
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.available_options
|
46
|
+
[
|
47
|
+
FastlaneCore::ConfigItem.new(key: :xcodeproj_path_or_dir,
|
48
|
+
description: "Path to, or directory of xcode project file",
|
49
|
+
type: String,
|
50
|
+
default_value: ".",
|
51
|
+
optional: false),
|
52
|
+
FastlaneCore::ConfigItem.new(key: :target,
|
53
|
+
description: "The target who's deployment target you want",
|
54
|
+
type: String,
|
55
|
+
default_value: "app",
|
56
|
+
optional: false),
|
57
|
+
FastlaneCore::ConfigItem.new(key: :configuration,
|
58
|
+
description: "The configuration who's target you want",
|
59
|
+
type: String,
|
60
|
+
optional: true)
|
61
|
+
]
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.is_supported?(platform)
|
65
|
+
platform == :ios
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-apadmi_grout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Apadmi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apadmi_grout
|
@@ -160,8 +160,10 @@ files:
|
|
160
160
|
- CHANGELOG.md
|
161
161
|
- LICENSE
|
162
162
|
- lib/fastlane/plugin/apadmi_grout.rb
|
163
|
+
- lib/fastlane/plugin/apadmi_grout/actions/build_ipa_action.rb
|
163
164
|
- lib/fastlane/plugin/apadmi_grout/actions/find_tickets_to_move_action.rb
|
164
165
|
- lib/fastlane/plugin/apadmi_grout/actions/generate_release_notes_action.rb
|
166
|
+
- lib/fastlane/plugin/apadmi_grout/actions/get_deployment_target_action.rb
|
165
167
|
- lib/fastlane/plugin/apadmi_grout/actions/move_jira_tickets_action.rb
|
166
168
|
- lib/fastlane/plugin/apadmi_grout/utils/fastlane_logger.rb
|
167
169
|
- lib/fastlane/plugin/apadmi_grout/version.rb
|