Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
126 lines (109 sloc) 3.11 KB
# vim: set ft=ruby
default_platform :ios
platform :ios do
desc 'Set Build Number to CIRCLE_BUILD_NUM'
lane :set_build_number do
increment_build_number(
build_number: ENV.fetch('CIRCLE_BUILD_NUM'),
xcodeproj: 'CI2Go.xcodeproj'
)
end
desc 'Run tests'
lane :tests do
xcode_select ENV['XCODE_PATH'] if ENV['XCODE_PATH']
run_tests
end
desc 'Build app for beta'
lane :beta_build do
xcode_select ENV['XCODE_PATH'] if ENV['XCODE_PATH']
build_app(
export_method: 'ad-hoc',
output_directory: './build/beta',
export_options: {
iCloudContainerEnvironment: 'Production'
}
)
end
desc 'Upload app to Fabric Beta'
lane :beta_upload do
crashlytics(
crashlytics_path: 'Vendor/Crashlytics.framework',
ipa_path: './build/beta/CI2Go.ipa',
api_token: '4f9578d15d7c0f51fa422575e9b409e496ebe259',
notifications: true,
notes: `git log -1 --pretty=%B`
)
end
desc 'Match Ad-Hoc Provisioning Profiles'
lane :beta_match do
xcode_select ENV['XCODE_PATH'] if ENV['XCODE_PATH']
setup_circle_ci
match type: 'adhoc'
end
desc 'Match App Store Provisioning Profiles'
lane :release_match do
xcode_select ENV['XCODE_PATH'] if ENV['XCODE_PATH']
setup_circle_ci
match type: 'appstore'
end
desc 'Build app for beta'
lane :release_build do
xcode_select ENV['XCODE_PATH'] if ENV['XCODE_PATH']
{
'CI2Go' => 'com.ci2go.ios.Circle',
'CI2GoWatch' => 'com.ci2go.ios.Circle.watchkitapp',
'CI2GoWatchExtension' => 'com.ci2go.ios.Circle.watchkitapp.ext',
'CI2GoTodayExtension' => 'com.ci2go.ios.Circle.todayext',
}.each do |target, identifier|
profile_name = "match AppStore #{identifier}"
disable_automatic_code_signing(
profile_name: profile_name,
bundle_identifier: identifier,
targets: [target]
)
end
build_app(
export_method: 'app-store',
output_directory: './build/release'
)
end
desc 'Publish app to App Store'
lane :release_upload do
pilot(
skip_waiting_for_build_processing: true,
distribute_external: true,
notify_external_testers: true,
changelog: `git log -1 --pretty=%B`,
testers_file_path: './fastlane/testers.csv',
ipa: './build/release/CI2Go.ipa'
)
end
desc 'Upload metadata to App Store'
lane :release_metadata do
deliver skip_screenshots: true
end
desc 'Upload screenshots to App Store'
lane :release_screenshots do
deliver skip_metadata: true, run_precheck_before_submit: false
end
desc 'Take screenshots'
lane :screenshots do
xcode_select ENV['XCODE_PATH'] if ENV['XCODE_PATH']
capture_screenshots
end
desc 'Increment minor version'
lane :increment_minor_version do
increment_version_number bump_type: 'minor'
end
desc 'Increment patch version'
lane :increment_patch_version do
increment_version_number bump_type: 'patch'
end
desc 'Upload Coverage data to Coveralls'
lane :send_coveralls do
coveralls(
repo_token: ENV.fetch('COVERALLS_REPO_TOKEN'),
derived_data_path: 'DerivedData'
)
end
end