integration test files
This commit is contained in:
Родитель
1715009706
Коммит
c99c460fe3
|
@ -8,3 +8,5 @@ Gemfile.lock
|
|||
/rdoc/
|
||||
fastlane/README.md
|
||||
fastlane/report.xml
|
||||
|
||||
.env
|
|
@ -1,3 +1,73 @@
|
|||
lane :test do
|
||||
mobile_center
|
||||
# load variables from .env file if it exists
|
||||
if File.exist?('../.env')
|
||||
open('../.env', 'r').readlines.each do |l|
|
||||
kv = l.split('=')
|
||||
ENV[kv[0]] = kv[1].chomp
|
||||
end
|
||||
end
|
||||
|
||||
lane :test do
|
||||
Actions.lane_context[SharedValues::FL_CHANGELOG] = 'shared changelog'
|
||||
|
||||
UI.message("\n\n\n=====================================\n uploading android\n=====================================")
|
||||
|
||||
mobile_center_upload(
|
||||
api_token: ENV["TEST_MOBILE_CENTER_API_TOKEN"],
|
||||
owner_name: ENV["TEST_MOBILE_CENTER_OWNER_NAME"],
|
||||
app_name: "MyApplication",
|
||||
apk: "./fastlane/app-release.apk",
|
||||
group: ENV["TEST_MOBILE_CENTER_DISTRIBUTE_GROUP"],
|
||||
release_notes: ENV["TEST_MOBILE_CENTER_DISTRIBUTE_RELEASE_NOTES"]
|
||||
)
|
||||
|
||||
UI.message("\n\n\n=====================================\n uploading ios with dSYM files (not zipped) \n=====================================")
|
||||
|
||||
mobile_center_upload(
|
||||
api_token: ENV["TEST_MOBILE_CENTER_API_TOKEN"],
|
||||
owner_name: ENV["TEST_MOBILE_CENTER_OWNER_NAME"],
|
||||
app_name: "MyApplication-01",
|
||||
ipa: "./fastlane/app-release.ipa",
|
||||
group: ENV["TEST_MOBILE_CENTER_DISTRIBUTE_GROUP"],
|
||||
dsym: "./fastlane/Themoji.dSYM",
|
||||
release_notes: ENV["TEST_MOBILE_CENTER_DISTRIBUTE_RELEASE_NOTES"]
|
||||
)
|
||||
|
||||
UI.message("\n\n\n=====================================\n uploading only dSYM files (not zipped) \n=====================================")
|
||||
|
||||
mobile_center_upload(
|
||||
api_token: ENV["TEST_MOBILE_CENTER_API_TOKEN"],
|
||||
owner_name: ENV["TEST_MOBILE_CENTER_OWNER_NAME"],
|
||||
app_name: "MyApplication-01",
|
||||
upload_dsym_only: true,
|
||||
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])}")
|
||||
|
||||
# use it for deleting all dSYM uploads
|
||||
# response.body.map! do |item|
|
||||
# connection.delete do |req|
|
||||
# req.url("/v0.1/apps/#{ENV['TEST_MOBILE_CENTER_OWNER_NAME']}/MyApplication-01/symbol_uploads/#{item[0]}")
|
||||
# req.headers['X-API-Token'] = ENV['TEST_MOBILE_CENTER_API_TOKEN']
|
||||
# end
|
||||
# end
|
||||
|
||||
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
|
||||
|
|
Двоичный файл не отображается.
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.libswiftCore.dylib</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>DBGOriginalUUID</key>
|
||||
<string>3AA3A790-552D-3052-9E7B-A97225E2D4FF</string>
|
||||
</dict>
|
||||
</plist>
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -1,44 +0,0 @@
|
|||
module Fastlane
|
||||
module Actions
|
||||
class MobileCenterAction < Action
|
||||
def self.run(params)
|
||||
UI.message("The mobile_center plugin is working!")
|
||||
end
|
||||
|
||||
def self.description
|
||||
"Distribute new release to Mobile Center"
|
||||
end
|
||||
|
||||
def self.authors
|
||||
["Evgeniy Khramkov"]
|
||||
end
|
||||
|
||||
def self.return_value
|
||||
# If your method provides a return value, you can describe here what it does
|
||||
end
|
||||
|
||||
def self.details
|
||||
# Optional:
|
||||
"Distribute new release to Mobile Center"
|
||||
end
|
||||
|
||||
def self.available_options
|
||||
[
|
||||
# FastlaneCore::ConfigItem.new(key: :your_option,
|
||||
# env_name: "MOBILE_CENTER_YOUR_OPTION",
|
||||
# description: "A description of your option",
|
||||
# optional: false,
|
||||
# type: String)
|
||||
]
|
||||
end
|
||||
|
||||
def self.is_supported?(platform)
|
||||
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
||||
# See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
|
||||
#
|
||||
# [:ios, :mac, :android].include?(platform)
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
describe Fastlane::Actions::MobileCenterAction do
|
||||
describe '#run' do
|
||||
it 'prints a message' do
|
||||
expect(Fastlane::UI).to receive(:message).with("The mobile_center plugin is working!")
|
||||
|
||||
Fastlane::Actions::MobileCenterAction.run(nil)
|
||||
end
|
||||
end
|
||||
end
|
Загрузка…
Ссылка в новой задаче