From 4d0f67e206e3dc9dbc3894ea6c90d9dd4401576d Mon Sep 17 00:00:00 2001 From: Evgeniy Khramkov Date: Mon, 8 May 2017 22:11:18 +0300 Subject: [PATCH] clean fasfile example --- README.md | 2 +- fastlane/Fastfile | 23 ++--------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 22b17f6..dc9851f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ fastlane add_plugin mobile_center Distribute new release to Mobile Center -**Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here. + ## Example diff --git a/fastlane/Fastfile b/fastlane/Fastfile index f406ea2..0cc6c8e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,4 +1,4 @@ -# load variables from .env file if it exists +# load variables from .env file in the root if it exists if File.exist?('../.env') open('../.env', 'r').readlines.each do |l| kv = l.split('=') @@ -7,6 +7,7 @@ if File.exist?('../.env') end lane :test do + # mobile_center_upload will readrelease_notes from FL_CHANGELOG Actions.lane_context[SharedValues::FL_CHANGELOG] = 'shared changelog' UI.message("\n\n\n=====================================\n uploading android\n=====================================") @@ -40,24 +41,4 @@ lane :test do dsym: "./fastlane/Themoji.dSYM", release_notes: ENV["TEST_MOBILE_CENTER_DISTRIBUTE_RELEASE_NOTES"] ) - - UI.message("\n\n\n=====================================\n showing uploaded dSYM files \n=====================================") - require 'faraday' - connection = Faraday.new(url: 'https://api.mobile.azure.com') do |builder| - builder.request :json - builder.response :json, content_type: /\bjson$/ - builder.adapter :net_http - end - - response = connection.get do |req| - req.url("/v0.1/apps/#{ENV['TEST_MOBILE_CENTER_OWNER_NAME']}/MyApplication-01/symbol_uploads") - req.headers['X-API-Token'] = ENV['TEST_MOBILE_CENTER_API_TOKEN'] - end - - UI.message("\n#{Terminal::Table.new(rows: response.body.map!(&:values), - headings: %w[symbol_upload_id app_id origin status symbol_type])}") - - UI.message("\n\n\n=====================================\n testing shared values\n=====================================") - UI.message("MOBILE_CENTER_DOWNLOAD_LINK = #{Actions.lane_context[SharedValues::MOBILE_CENTER_DOWNLOAD_LINK]}") - UI.message("MOBILE_CENTER_BUILD_INFORMATION = #{JSON.pretty_generate(Actions.lane_context[SharedValues::MOBILE_CENTER_BUILD_INFORMATION])}") end