feat: import proxy and remote support

This commit is contained in:
Klesh Wong 2023-02-28 09:38:55 +08:00
parent c3bf916d8a
commit ef360a3443

View File

@ -5,12 +5,12 @@ set -e
# push current branch to ORIGIN and create a PR on UPSTREAM # push current branch to ORIGIN and create a PR on UPSTREAM
# UPSTREAM must be a https github url # UPSTREAM must be a https github url
if [ -n "$PROXY_HOST" ] && [ -n "$PROXY_PORT" ]; then if [ -n "$PROXY_HOST" ] && [ -n "$PROXY_PORT" ]; then
export HTTPS_PROXY=http://$PROXY_HOST:$PROXY_PORT export HTTP_PROXYS=http://$PROXY_HOST:$PROXY_PORT
echo HTTP_PROXYS=$HTTP_PROXYS
fi fi
echo $HTTPS_PROXY
BRANCH=$(git branch --show-current) BRANCH=$(git branch --show-current)
UPSTREAM_BRANCH=$(git remote show upstream | grep -oP 'HEAD branch: \K\w+') UPSTREAM_BRANCH=$(HTTP_PROXYS=$HTTP_PROXYS git remote show upstream | grep -oP 'HEAD branch: \K\w+')
ORIGIN_URL=$(git remote get-url origin) ORIGIN_URL=$(git remote get-url origin)
case "$ORIGIN_URL" in case "$ORIGIN_URL" in
git@github.com:*) git@github.com:*)