Skip to content

Commit

Permalink
Merge pull request #67 from oklimberg/fix_shared_values_module
Browse files Browse the repository at this point in the history
Move shared values definition from module Fastlane::Helper to Fastlane::Actions
  • Loading branch information
evkhramkov authored Apr 25, 2019
2 parents bc38db3 + f556286 commit e774df3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ module Constants
MAX_RELEASE_NOTES_LENGTH = 5000
end

module SharedValues
APPCENTER_DOWNLOAD_LINK = :APPCENTER_DOWNLOAD_LINK
APPCENTER_BUILD_INFORMATION = :APPCENTER_BUILD_INFORMATION
end

class AppcenterUploadAction < Action
# run whole upload process for dSYM files
def self.run_dsym_upload(params)
Expand Down
13 changes: 4 additions & 9 deletions lib/fastlane/plugin/appcenter/helper/appcenter_helper.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
module Fastlane
module Helper
module SharedValues
APPCENTER_DOWNLOAD_LINK = :APPCENTER_DOWNLOAD_LINK
APPCENTER_BUILD_INFORMATION = :APPCENTER_BUILD_INFORMATION
end

class AppcenterHelper

# create request
Expand Down Expand Up @@ -260,8 +255,8 @@ def self.update_release(api_token, owner_name, app_name, release_id, release_not

UI.message("DEBUG: #{JSON.pretty_generate(release)}") if ENV['DEBUG']

Actions.lane_context[SharedValues::APPCENTER_DOWNLOAD_LINK] = download_url
Actions.lane_context[SharedValues::APPCENTER_BUILD_INFORMATION] = release
Actions.lane_context[Fastlane::Actions::SharedValues::APPCENTER_DOWNLOAD_LINK] = download_url
Actions.lane_context[Fastlane::Actions::SharedValues::APPCENTER_BUILD_INFORMATION] = release

UI.message("Release #{release['short_version']} was successfully updated")

Expand Down Expand Up @@ -301,8 +296,8 @@ def self.add_to_group(api_token, owner_name, app_name, release_id, group_id, man

UI.message("DEBUG: received release #{JSON.pretty_generate(release)}") if ENV['DEBUG']

Actions.lane_context[SharedValues::APPCENTER_DOWNLOAD_LINK] = download_url
Actions.lane_context[SharedValues::APPCENTER_BUILD_INFORMATION] = release
Actions.lane_context[Fastlane::Actions::SharedValues::APPCENTER_DOWNLOAD_LINK] = download_url
Actions.lane_context[Fastlane::Actions::SharedValues::APPCENTER_BUILD_INFORMATION] = release

UI.message("Public Download URL: #{download_url}") if download_url

Expand Down

0 comments on commit e774df3

Please sign in to comment.