2018-03-26 10:56:25 +00:00
|
|
|
# This file contains the fastlane.tools configuration
|
|
|
|
# You can find the documentation at https://docs.fastlane.tools
|
|
|
|
#
|
|
|
|
# For a list of all available actions, check out
|
|
|
|
#
|
|
|
|
# https://docs.fastlane.tools/actions
|
|
|
|
#
|
|
|
|
|
2018-08-13 11:40:24 +00:00
|
|
|
# There are a few env variables defined in the .env file in
|
|
|
|
# this directory (fastlane/.env)
|
|
|
|
|
|
|
|
|
|
|
|
# unlocks keychain if KEYCHAIN_PASSWORD variable is present
|
|
|
|
# (to be used on CI machines)
|
|
|
|
def unlock_keychain_if_needed
|
|
|
|
if ENV["KEYCHAIN_PASSWORD"]
|
|
|
|
unlock_keychain(
|
|
|
|
path:"login.keychain",
|
|
|
|
password:ENV["password"],
|
|
|
|
set_default: true)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# builds an ios app with ad-hoc configuration and put it
|
|
|
|
# to "status-adhoc" output folder
|
|
|
|
def build_ios_adhoc
|
|
|
|
match(
|
|
|
|
type: "adhoc",
|
|
|
|
force_for_new_devices: true,
|
|
|
|
readonly: true,
|
|
|
|
keychain_name: "login.keychain"
|
|
|
|
)
|
|
|
|
build_ios_app(
|
|
|
|
scheme: "StatusIm",
|
|
|
|
workspace: "ios/StatusIm.xcworkspace",
|
|
|
|
configuration: "Release",
|
|
|
|
clean: true,
|
|
|
|
export_method: "ad-hoc",
|
|
|
|
output_directory: "status-adhoc"
|
|
|
|
)
|
|
|
|
end
|
2018-03-26 10:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
platform :ios do
|
2018-08-13 11:40:24 +00:00
|
|
|
desc "`fastlane ios adhoc` - ad-hoc lane for iOS."
|
|
|
|
desc "This lane is used PRs, Releases, etc."
|
|
|
|
desc "It creates an .ipa that can be used by a list of devices, registeded in the App Store Connect."
|
|
|
|
desc "This .ipa is ready to be distibuted through diawi.com"
|
|
|
|
lane :adhoc do
|
|
|
|
unlock_keychain_if_needed
|
|
|
|
build_ios_adhoc
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "`fastlane ios nightly` - makes a new nightly in TestFlight"
|
|
|
|
desc "This lane builds a new nightly and uploads it to TestFlight"
|
|
|
|
desc "It also leaves an .ipa that is ad-hoc signed (can be uploaded to diawi)"
|
2018-03-26 10:56:25 +00:00
|
|
|
lane :nightly do
|
2018-08-13 11:40:24 +00:00
|
|
|
unlock_keychain_if_needed
|
|
|
|
|
|
|
|
match(
|
|
|
|
type: "appstore",
|
|
|
|
force_for_new_devices: true,
|
|
|
|
readonly: true,
|
|
|
|
keychain_name: "login.keychain"
|
|
|
|
)
|
|
|
|
build_ios_app(
|
|
|
|
scheme: "StatusIm",
|
|
|
|
workspace: "ios/StatusIm.xcworkspace",
|
|
|
|
configuration: "Release",
|
|
|
|
clean: true,
|
|
|
|
export_method: "app-store",
|
|
|
|
output_directory: "status_appstore"
|
|
|
|
)
|
2018-03-26 10:56:25 +00:00
|
|
|
upload_to_testflight(
|
2018-04-01 08:21:09 +00:00
|
|
|
ipa: "status_appstore/StatusIm.ipa"
|
2018-03-26 10:56:25 +00:00
|
|
|
)
|
2018-08-13 11:40:24 +00:00
|
|
|
slack(message: "New nightly build uploaded to TestFlight")
|
|
|
|
|
|
|
|
# additional .ipa is for diawi
|
|
|
|
# we have to re-build it because it uses different config
|
|
|
|
build_ios_adhoc
|
2018-03-26 10:56:25 +00:00
|
|
|
end
|
2018-08-13 11:40:24 +00:00
|
|
|
|
|
|
|
desc "`fastlane ios release` builds a release & uploads it to TestFlight"
|
2018-04-04 16:36:26 +00:00
|
|
|
lane :release do
|
2018-08-13 11:40:24 +00:00
|
|
|
match(
|
|
|
|
type: "appstore",
|
|
|
|
force_for_new_devices: true,
|
|
|
|
readonly: true,
|
|
|
|
keychain_name: "login.keychain"
|
|
|
|
)
|
|
|
|
build_ios_app(
|
|
|
|
scheme: "StatusIm",
|
|
|
|
workspace: "ios/StatusIm.xcworkspace",
|
|
|
|
configuration: "Release",
|
|
|
|
clean: true,
|
|
|
|
export_method: "app-store",
|
|
|
|
output_directory: "status_appstore",
|
|
|
|
export_options: {
|
|
|
|
"combileBitcode": true,
|
|
|
|
"uploadBitcode": false,
|
|
|
|
"ITSAppUsesNonExemptEncryption": false
|
|
|
|
}
|
|
|
|
)
|
2018-04-04 16:36:26 +00:00
|
|
|
upload_to_testflight(
|
|
|
|
ipa: "status_appstore/StatusIm.ipa"
|
|
|
|
)
|
2018-08-13 11:40:24 +00:00
|
|
|
slack(message: "New release build uploaded to TestFlight")
|
2018-04-04 16:36:26 +00:00
|
|
|
end
|
2018-08-13 11:40:24 +00:00
|
|
|
|
|
|
|
desc "`fastlane ios clean` - remove inactive TestFlight users"
|
|
|
|
desc "uses custom plugin, installed via"
|
|
|
|
desc "`sudo get install fastlane-plugin-clean_testflight_testers`"
|
2018-03-28 09:15:16 +00:00
|
|
|
lane :clean do
|
|
|
|
clean_testflight_testers
|
|
|
|
end
|
2018-03-26 10:56:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
platform :android do
|
|
|
|
desc "Deploy a new internal build to Google Play"
|
|
|
|
lane :nightly do
|
|
|
|
upload_to_play_store(
|
|
|
|
track: "internal",
|
|
|
|
apk: "android/app/build/outputs/apk/release/app-release.apk"
|
|
|
|
)
|
|
|
|
slack(message: "New nightly build uploaded to Google Play")
|
|
|
|
end
|
2018-04-04 16:36:26 +00:00
|
|
|
lane :release do
|
|
|
|
upload_to_play_store(
|
|
|
|
track: "alpha",
|
|
|
|
apk: "android/app/build/outputs/apk/release/app-release.apk"
|
|
|
|
)
|
|
|
|
slack(message: "New release build uploaded to Google Play")
|
|
|
|
end
|
2018-03-26 10:56:25 +00:00
|
|
|
end
|