Created
October 8, 2016 09:30
-
-
Save lxhunter/758e1e3041d7ec7aec3814018d781e29 to your computer and use it in GitHub Desktop.
Automated merging of branches into master for travis-ci or any other ci
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
#!/bin/bash | |
git config --global user.email '[email protected]' | |
git config --global user.name 'Travis' | |
git remote set-branches --add origin master | |
git fetch | |
git reset --hard | |
git checkout master | |
git merge --ff-only "$TRAVIS_COMMIT" | |
git push git+ssh://[email protected]/${TRAVIS_REPO_SLUG}.git master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For automerge you need to use credentials to let travis access the repos, I used:
If you have no key, you can start like this:
If you just want to merge one branch into master use (you might want to fork my scripts):