fastlane_version "1.25.0"
default_platform :ios
platform :ios do
before_all do
ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
#cocoapods
increment_build_number
gym(scheme: "srsApp") # Build your app - more options available
# xctool # run the tests of your app
end
desc "Runs all the tests"
lane :test do
snapshot
end
desc "Submit a new Beta Build to fir"
desc "This will also make sure the profile is up to date"
lane :fir do
#snapshot
sh "sigh --team_id your_team_id"
#deliver(beta: true)
#"ipa distribute:pgyer -u USER_KEY -a APP_KEY" # 上传到蒲公英
#"ipa distribute:fir -u USER_TOKEN -a APP_ID" # 上传到fir.im
# sh"ipa distribute:fir -u USER_KEY -a APP_KEY"
# You can also use other beta testing services here
sh "fir p ../srsApp.ipa -T USER_TOKEN"
end
desc "Submit a new Beta Build to pgyer "
desc "This will also make sure the profile is up to date"
lane :pgyer do
#snapshot
sh "sigh --team_id your_team_id"
#deliver(beta: true)
# You can also use other beta testing services here
sh "curl -F \"file=@/Users/dongmeiliang/Documents/HJKApp/srsApp/srsApp.ipa\" -F \"uKey=USER_TOKEN\" -F \"_api_key=APP_KEY\" http://www.pgyer.com/apiv1/app/upload"
end
# You can define as many lanes as you want
after_all do |lane|
# This block is called, only if the executed lane was successful
slack(
message: "Successfully deployed new App Update."
)
end
error do |lane, exception|
slack(
message: exception.message,
success: false
)
end
end