Sha256: 40e9d747470c9dd1f7d84fafcd7db395388c6e46a59a073416ec7a091c25a9a7
Contents?: true
Size: 1.04 KB
Versions: 14
Compression:
Stored size: 1.04 KB
Contents
#!/usr/bin/env bash set -e echo "-----Create and switch to new branch-----" current_date=$(date +"%Y%m%d%H%M") new_branch_name="auto-upgrade-tools-dependencies-${current_date}" git checkout -b $new_branch_name echo "-----Run Gemfile.tools update-----" if bin/tools-upgrade; then echo 'Updated successfully' git config user.name "jt-tools-deployments" git config user.email "circleci.bot@example.com" git commit -am "Upgrades Gemfile.tools dependencies" git push "https://$GITHUB_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git" -f curl -X POST \ -H "Authorization: token ${GITHUB_TOKEN}" \ -d '{"title":"Upgrades tools dependencies","base":"master","head":"'$CIRCLE_PROJECT_USERNAME':'$new_branch_name'"}' \ https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls exit 0 else echo 'Failed to update\n' exit 1 fi
Version data entries
14 entries across 14 versions & 1 rubygems