Created
October 13, 2021 12:11
-
-
Save litoarias/bdf166d2d06b9df9ea9cb1a7226f8c6a to your computer and use it in GitHub Desktop.
Slack manager for Fastlane
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def broadcast_message() | |
version = get_info_plist_value( | |
path: "#{APP_NAME}/Info.plist", | |
key: "CFBundleShortVersionString" | |
) | |
build = get_info_plist_value( | |
path: "#{APP_NAME}/Info.plist", | |
key: "CFBundleVersion" | |
) | |
slack( | |
message: "Hi! A new iOS build has been submitted to TestFlight", | |
payload: { | |
"Build Date" => Time.new.to_s, | |
"Release Version" => version+"."+build | |
}, | |
slack_url: SLACK_CHANNEL, | |
use_webhook_configured_username_and_icon: true, | |
fail_on_error: false, | |
success: true | |
) | |
end | |
def on_error(exception) | |
slack( | |
message: exception.to_s, | |
slack_url: SLACK_CHANNEL, | |
success: false, | |
payload: { "Output" => exception.to_s }, | |
fail_on_error: true | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment