#!/bin/sh

BRANNAME=$(git rev-parse --abbrev-ref HEAD)
echo "即将发版 ${BRANNAME} 分支？Y/N"
char=$(../get-char.sh)

echo $char

if [ "$char" != "y" ] && [ "$char" != "Y" ]; then
  exit
fi

ssh root@10.2.123.14 -i \
./ssh/id_rsa \
"cd /home/data/consult-cloud-hg-fe && pwd && git checkout ${BRANNAME} && git pull origin ${BRANNAME} && ./build-test.sh"
