Last active
March 31, 2017 16:43
-
-
Save benjaminoakes/2b99b6cded00f8ed2279c6955e8508ec to your computer and use it in GitHub Desktop.
Push to a run-ci (whitelisted) branch to run CI on Travis, etc.
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/sh | |
show_usage() { | |
cat <<EOF | |
Usage: $0 branch_name | |
Push to a run-ci (whitelisted) branch to run CI on Travis, etc. | |
NOTE: this is only necessary for a project like WebAdMIT that has disabled CI | |
for branches by default. We explicitly whitelisted \`run-ci/*\`. | |
See also: \`.travis.yml\` | |
EOF | |
exit 1 | |
} | |
branch_name="$1" | |
if [ "$branch_name" == "" ]; then | |
show_usage | |
fi | |
set -x | |
git push --force origin "$branch_name:run-ci/$branch_name" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment