Created
April 20, 2019 02:42
-
-
Save kishikawakatsumi/5437868cf508a4e6e5e990bff0c03c5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lane :sync_bitrise_yml do | |
if !ENV['CI'] | |
next | |
end | |
Dir.chdir("#{ENV['PWD']}") do | |
sh "curl -O -H 'Authorization: token #{ENV['BITRISE_ACCESS_TOKEN']}' 'https://api.bitrise.io/v0.1/apps/#{ENV['BITRISE_APP_SLUG']}/bitrise.yml'" | |
unless system('git diff --quiet --exit-code') | |
sh 'git add bitrise.yml' | |
commit_push_create_pr(branch_name: "ci/sync-bitrise_yml-#{Time.now.to_i}", message: 'Sync bitrise.yml') | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment