Skip to content

Instantly share code, notes, and snippets.

View xotahal's full-sized avatar
🏠
Working from home

Jiří Otáhal xotahal

🏠
Working from home
View GitHub Profile
lane :publish do |options|
# Test if environment is set up correctly
# (node installed, token for publishing, etc.)
verify
# Go through the GIT history and finds out what is the next version
# If there is nothing to release it won't publish anything
next unless analyze_commits
# Building
build_npm
// ...
if (project.hasProperty("vcode")) {
verCode = vcode as Integer
}
if (project.hasProperty("vname")) {
verName = vname
}
// ...
defaultConfig {
// ...
desc "Build an android release"
lane :build do |options|
gradle(
task: "assemble",
build_type: "Release",
flavor: options[:flavor],
properties: {
'vcode' => build_number,
'vname' => options[:next_version]
}
desc "Verify next release"
lane :verify do |options|
# Git status has to be clean
ensure_git_status_clean
# if the build is run on local machine
if !is_ci? then
# it sends slack message about the deploy was triggered
slack(message: "#{title} deploy was triggered on local machine")
# it cleans caches and reinstall node_modules, etc.
clean(scheme: scheme)
desc "Build a new version of iOS App"
lane :build do |options|
next_version = lane_context[SharedValues::RELEASE_NEXT_VERSION]
# pod install
cocoapods(podfile: 'ios')
# pod install & yarn just
# check that .lock files were not changed
ensure_git_status_clean
# code signing
match(type: "appstore")
desc "Generates release notes for slack and create the next tag"
lane :post_deploy do |options|
flavor = options[:flavor]
title = options[:title]
next_version = lane_context[SharedValues::RELEASE_NEXT_VERSION]
# Get release notes since last version for slack
notes = conventional_changelog(title: title, format: 'slack')
# Create tag to recognize future "last version" (the current version)
add_git_tag(tag: "ios/#{flavor}/#{next_version}/#{build_number}")
desc "Build a new alpha version"
lane :alpha do |options|
tag_prefix = 'ios/alpha*'
title = 'iOS Alpha'
scheme = 'ExampleApp'
groups = 'Alpha Team'
flavor = 'alpha'
# Verify next release
next unless verify(scheme: scheme, title: title, tag_prefix: tag_prefix)
before_all do |options, params|
build_number =
# highest priority has build_number passes as parameter to the fastlane
params[:build_number] ||
# we use Circle CI - build number is autoincremented on CI
# we can get it from environment
ENV["CIRCLE_BUILD_NUM"] ||
# if you run fastlane localy on your machine it gets build number
# from Circle CI by using their API
get_last_circleci_build_number
<Shape
d="M0,71 C26,39.5,53,8,80,8 C106,8,133,57,160,71 C186,85,213,92,240,92 C266,92,293,60,320,29"
/>
<View style={styles.container}>
<TranslateY
style={[styles.graphContainer]}
value={graphLayerY}
delay={delay}
>
// Positive column
<TranslateY
style={styles.positiveColumn}
value={positiveY}