Skip to content

Commit

Permalink
moved shared valued from module Fastlane::Helper to Fastlane::Actions
Browse files Browse the repository at this point in the history
this seems to be the default module to define shared values according to all
other fastlane actions
  • Loading branch information
oklimberg committed Apr 24, 2019
1 parent bc38db3 commit f556286
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 f556286

Please sign in to comment.