Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Use an environment variable to know which branch should be used.
if [ -z "$D8_UPSTREAM_BRANCH" ]; then
echo "Missing the \$D8_UPSTREAM_BRANCH environment variable which must be set to something like '8.7.x'."
exit 1
fi
current_branch=$(git symbolic-ref --short HEAD)
branch=${1:-${D8_UPSTREAM_BRANCH}}