Skip to content

Instantly share code, notes, and snippets.

@andreas-nesheim
Last active October 16, 2017 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreas-nesheim/a5ab1d161c425d4a6e2c8a8d53f19f21 to your computer and use it in GitHub Desktop.
Save andreas-nesheim/a5ab1d161c425d4a6e2c8a8d53f19f21 to your computer and use it in GitHub Desktop.
# More documentation about how to customize your build
# can be found here:
# https://docs.fastlane.tools
fastlane_version "1.109.0"
# This value helps us track success metrics for Fastfiles
# we automatically generate. Feel free to remove this line
# once you get things running smoothly!
generated_fastfile_id "eaa63146-cce2-47fa-b5d5-4884f76ecada"
default_platform :ios
# Fastfile actions accept additional configuration, but
# don't worry, fastlane will prompt you for required
# info which you can add here later
lane :beta do
# get current build number
build_number = get_info_plist_value(
key: 'CFBundleVersion',
path: 'path/to/projects/Info.plist'
)
# convert the build number from string to int, increment and convert back to string
build_number = Integer(build_number)
build_number += 1
build_number = build_number.to_s
# set incremented build number
set_info_plist_value(
key: 'CFBundleVersion',
value: build_number,
path: 'path/to/projects/Info.plist'
)
xamarin_update_configuration(
property: 'CodesignKey',
value: 'iPhone Developer: John Smith (12345ABCDE)',
xamarin_project_file: 'path/to/MyProject.csproj',
build_type: 'Debug',
platform: 'iPhone'
)
xamarin_update_configuration(
property: 'CodesignProvision',
value: 'SampleProject Provisioning Profile',
xamarin_project_file: 'path/to/MyProject.csproj',
build_type: 'Debug',
platform: 'iPhone'
)
# build your iOS app
xamarin_build(
solution: '/Users/user/projects/path/to/project/ProjectSolution.sln',
platform: 'iPhone',
target: 'Build',
project: 'MyProjectName',
build_type: 'Debug',
print_all: true
)
# upload to HockeyApp
hockey(
api_token: 'insertyourtokenhere',
ipa: './bin/iPhone/Debug/MyProject.ipa'
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment