#!/bin/bash
project_name=$1
branch_name=$2
public_ip=$3

sh /home/qa-deploy-utils/qa_shell_script/2_get_code_by_name.sh $project_name $branch_name $4
if [ $? = 0 ]; then
	echo "2_get_code_by_name ok"
else
	echo "2_get_code_by_name fail"
	exit -1
fi
sh /home/qa-deploy-utils/qa_shell_script/3_link_config_file_by_name.sh $project_name $public_ip $4
if [ $? = 0 ]; then
	echo "3_link_config_file_by_name ok"
else
	echo "3_link_config_file_by_name fail"
	exit -1
fi
sh /home/qa-deploy-utils/qa_shell_script/4_build_by_name.sh $project_name $public_ip $4
if [ $? = 0 ]; then
	echo "4_build_by_name ok"
else
	echo "4_build_by_name fail"
	exit -1
fi
sh /home/qa-deploy-utils/qa_shell_script/5_restart_by_name.sh $project_name $public_ip $4
if [ $? = 0 ]; then
	echo "5_restart_by_name ok"
else
	echo "5_restart_by_name fail"
	exit -1
fi
