Skip to content

Instantly share code, notes, and snippets.

@benjaminoakes
Last active March 31, 2017 16:43
Show Gist options
  • Save benjaminoakes/2b99b6cded00f8ed2279c6955e8508ec to your computer and use it in GitHub Desktop.
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.
#!/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