Skip to content

Commit

Permalink
[action] added Appcenter plugin link to use instead of hockeyApp (#14325
Browse files Browse the repository at this point in the history
)

* added Appcenter plugin link to use instead of hockeyApp

* Deprecated hockey action, deprecation notes, updated descripton

* Removing markdown for links in description and deprecation notes
  • Loading branch information
ksairi authored and Josh Holtz committed Mar 10, 2019
1 parent cefdb78 commit 9a4fd03
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
8 changes: 8 additions & 0 deletions fastlane/lib/fastlane/action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,12 @@ def dedent!

self.gsub!(/^#{first_line_indent}/, "")
end

def remove_markdown
string = self.gsub(/^>/, "") # remove Markdown quotes
string = string.gsub(/\[http[^\]]+\]\(([^)]+)\)/, '\1 🔗') # remove Markdown links
string = string.gsub(/\[([^\]]+)\]\(([^\)]+)\)/, '"\1" (\2 🔗)') # remove Markdown links with custom text
string = string.gsub("|", "") # remove new line preserve markers
return string
end
end
14 changes: 12 additions & 2 deletions fastlane/lib/fastlane/actions/hockey.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def self.run(options)
end

def self.description
"Upload a new build to [HockeyApp](https://hockeyapp.net/)"
"Refer to [App Center](https://github.com/Microsoft/fastlane-plugin-appcenter/)"
end

def self.available_options
Expand Down Expand Up @@ -356,6 +356,9 @@ def self.is_supported?(platform)

def self.details
[
"HockeyApp will be no longer supported and will be transitioned into App Center on November 16, 2019.",
"Please migrate over to [App Center](https://github.com/Microsoft/fastlane-plugin-appcenter/)",
"",
"Symbols will also be uploaded automatically if a `app.dSYM.zip` file is found next to `app.ipa`. In case it is located in a different place you can specify the path explicitly in the `:dsym` parameter.",
"More information about the available options can be found in the [HockeyApp Docs](http://support.hockeyapp.net/kb/api/api-versions#upload-version)."
].join("\n")
Expand Down Expand Up @@ -388,7 +391,14 @@ def self.example_code
end

def self.category
:beta
:deprecated
end

def self.deprecated_notes
[
"HockeyApp will be no longer supported and will be transitioned into App Center on November 16, 2019.",
"Please migrate over to [App Center](https://github.com/Microsoft/fastlane-plugin-appcenter/)"
].join("\n")
end
end
# rubocop:enable Metrics/ClassLength
Expand Down
13 changes: 5 additions & 8 deletions fastlane/lib/fastlane/documentation/actions_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def self.print_all(platform: nil)
end

if action < Action
current << action.description if action.description
current << action.description.to_s.remove_markdown if action.description

authors = Array(action.author || action.authors)
current << authors.first.green if authors.count == 1
Expand Down Expand Up @@ -64,7 +64,7 @@ def self.show_details(filter: nil)
if Fastlane::Actions.is_deprecated?(action)
puts("==========================================".deprecated)
puts("This action (#{filter}) is deprecated".deprecated)
puts(action.deprecated_notes.to_s.deprecated) if action.deprecated_notes
puts(action.deprecated_notes.to_s.remove_markdown.deprecated) if action.deprecated_notes
puts("==========================================\n".deprecated)
end

Expand Down Expand Up @@ -107,16 +107,13 @@ def self.print_summary(action, name)
rows = []

if action.description
rows << [action.description]
description = action.description.to_s.remove_markdown
rows << [description]
rows << [' ']
end

if action.details
details = action.details
details.gsub!(/^>/, "") # remove Markdown quotes
details.gsub!(/\[http[^\]]+\]\(([^)]+)\)/, '\1 🔗') # remove Markdown links
details.gsub!(/\[([^\]]+)\]\(([^\)]+)\)/, '"\1" (\2 🔗)') # remove Markdown links with custom text
details.gsub!("|", "") # remove new line preserve markers
details = action.details.to_s.remove_markdown
details.split("\n").each do |detail|
row = detail.empty? ? ' ' : detail
rows << [row]
Expand Down
2 changes: 1 addition & 1 deletion fastlane/lib/fastlane/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def execute_action(method_sym, class_ref, arguments, custom_dir: nil, from_actio
if Fastlane::Actions.is_deprecated?(class_ref)
puts("==========================================".deprecated)
puts("This action (#{method_sym}) is deprecated".deprecated)
puts(class_ref.deprecated_notes.to_s.deprecated) if class_ref.deprecated_notes
puts(class_ref.deprecated_notes.to_s.remove_markdown.deprecated) if class_ref.deprecated_notes
puts("==========================================\n".deprecated)
end
class_ref.runner = self # needed to call another action form an action
Expand Down

0 comments on commit 9a4fd03

Please sign in to comment.