From a997ae5b1840f2878b16443bd8e3c784d23ba9ac Mon Sep 17 00:00:00 2001 From: Felipe Sateler Date: Sun, 19 Nov 2017 18:27:48 -0300 Subject: Import docker-compose_1.17.1.orig.tar.gz [dgit import orig docker-compose_1.17.1.orig.tar.gz] --- script/release/cherry-pick-pr | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 script/release/cherry-pick-pr (limited to 'script/release/cherry-pick-pr') diff --git a/script/release/cherry-pick-pr b/script/release/cherry-pick-pr new file mode 100755 index 00000000..f4a5a740 --- /dev/null +++ b/script/release/cherry-pick-pr @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Cherry-pick a PR into the release branch +# + +set -e +set -o pipefail + + +function usage() { + >&2 cat << EOM +Cherry-pick commits from a github pull request. + +Usage: + + $0 +EOM + exit 1 +} + +[ -n "$1" ] || usage + +if [ -z "$(command -v hub 2> /dev/null)" ]; then + >&2 echo "$0 requires https://hub.github.com/." + >&2 echo "Please install it and make sure it is available on your \$PATH." + exit 2 +fi + + +REPO=docker/compose +GITHUB=https://github.com/$REPO/pull +PR=$1 +url="$GITHUB/$PR" +hub am -3 $url -- cgit v1.2.3