Skip to content

Instantly share code, notes, and snippets.

@xotahal
Created March 19, 2019 03:47
Show Gist options
  • Save xotahal/84d54fe3ad6ac9fadafb55540cd2b77e to your computer and use it in GitHub Desktop.
Save xotahal/84d54fe3ad6ac9fadafb55540cd2b77e to your computer and use it in GitHub Desktop.
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)
# yarn lint && yarn jest && yarn flow
check_code_quality
else
# We don't need to do this on CI because repo is fresh
slack(message: "#{title} deploy was triggered on CircleCI")
end
# Check if there is any change since last version
is_releaseable = analyze_commits(match: tag_prefix)
unless is_releaseable
slack(message: "Skip deploying #{title}. No changes since last one!")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment