-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Dominik Kapusta <[email protected]>
- Loading branch information
Showing
28 changed files
with
2,728 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
lib/fastlane/plugin/ddg_apple_automation/actions/bump_build_number_action.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
require "fastlane/action" | ||
require "fastlane_core/configuration/config_item" | ||
require "octokit" | ||
require_relative "../helper/asana_helper" | ||
require_relative "../helper/ddg_apple_automation_helper" | ||
require_relative "../helper/git_helper" | ||
require_relative "../helper/github_actions_helper" | ||
|
||
module Fastlane | ||
module Actions | ||
class BumpBuildNumberAction < Action | ||
def self.run(params) | ||
Helper::GitHelper.setup_git_user | ||
params[:platform] ||= Actions.lane_context[Actions::SharedValues::PLATFORM_NAME] | ||
options = params.values | ||
Helper::DdgAppleAutomationHelper.increment_build_number(options[:platform], options, other_action) | ||
end | ||
|
||
def self.description | ||
"Prepares a subsequent internal release" | ||
end | ||
|
||
def self.authors | ||
["DuckDuckGo"] | ||
end | ||
|
||
def self.return_value | ||
"The newly created release task ID" | ||
end | ||
|
||
def self.details | ||
"This action increments the project build number and pushes the changes to the remote repository." | ||
end | ||
|
||
def self.available_options | ||
[ | ||
FastlaneCore::ConfigItem.asana_access_token, | ||
FastlaneCore::ConfigItem.github_token, | ||
FastlaneCore::ConfigItem.platform | ||
] | ||
end | ||
|
||
def self.is_supported?(platform) | ||
true | ||
end | ||
end | ||
end | ||
end |
80 changes: 80 additions & 0 deletions
80
lib/fastlane/plugin/ddg_apple_automation/actions/start_new_release_action.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
require "fastlane/action" | ||
require "fastlane_core/configuration/config_item" | ||
require "octokit" | ||
require_relative "../helper/asana_helper" | ||
require_relative "../helper/ddg_apple_automation_helper" | ||
require_relative "../helper/git_helper" | ||
require_relative "../helper/github_actions_helper" | ||
|
||
module Fastlane | ||
module Actions | ||
class StartNewReleaseAction < Action | ||
def self.run(params) | ||
Helper::GitHelper.setup_git_user | ||
params[:platform] ||= Actions.lane_context[Actions::SharedValues::PLATFORM_NAME] | ||
|
||
options = params.values | ||
options[:asana_user_id] = Helper::AsanaHelper.get_asana_user_id_for_github_handle(options[:github_handle]) | ||
|
||
release_branch_name, new_version = Helper::DdgAppleAutomationHelper.prepare_release_branch( | ||
params[:platform], params[:version], other_action | ||
) | ||
options[:version] = new_version | ||
options[:release_branch_name] = release_branch_name | ||
|
||
release_task_id = Helper::AsanaHelper.create_release_task(options[:platform], options[:version], options[:asana_user_id], options[:asana_access_token]) | ||
options[:release_task_id] = release_task_id | ||
|
||
Helper::AsanaHelper.update_asana_tasks_for_internal_release(options) | ||
end | ||
|
||
def self.description | ||
"Starts a new release" | ||
end | ||
|
||
def self.authors | ||
["DuckDuckGo"] | ||
end | ||
|
||
def self.return_value | ||
"The newly created release task ID" | ||
end | ||
|
||
def self.details | ||
<<-DETAILS | ||
This action performs the following tasks: | ||
* creates a new release branch, | ||
* updates version and build number, | ||
* updates embedded files, | ||
* pushes the changes to the remote repository, | ||
* creates a new Asana release task based off the provided task template, | ||
* updates the Asana release task with tasks included in the release. | ||
DETAILS | ||
end | ||
|
||
def self.available_options | ||
[ | ||
FastlaneCore::ConfigItem.asana_access_token, | ||
FastlaneCore::ConfigItem.github_token, | ||
FastlaneCore::ConfigItem.platform, | ||
FastlaneCore::ConfigItem.new(key: :version, | ||
description: "Version number to force (calculated automatically if not provided)", | ||
optional: true, | ||
type: String), | ||
FastlaneCore::ConfigItem.new(key: :github_handle, | ||
description: "Github user handle", | ||
optional: false, | ||
type: String), | ||
FastlaneCore::ConfigItem.new(key: :target_section_id, | ||
description: "Section ID in Asana where tasks included in the release should be moved", | ||
optional: false, | ||
type: String) | ||
] | ||
end | ||
|
||
def self.is_supported?(platform) | ||
true | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.