7 Star 7 Fork 26

HuaweiCloudDeveloper / huaweicloud-cloudPhone-aosp9

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.sh 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
liuyijia 提交于 2023-10-09 16:45 . add build.sh
#!/usr/bin/env bash
# 验证
KEY=""
# 指定克隆分支
BRANCH_TAG=""
# 镜像别名
IMG_NAME=""
# 编译服务器地址
SERVER_ADDR=""
# 默认不执行增量编译
INCREMENTAL=0
while getopts ":il" opt; do
case "${opt}" in
i) INCREMENTAL=1;;
l)
curl -X POST -k --insecure -H "key: ${KEY}" https://${SERVER_ADDR}:8081/get_log
exit 0;;
?)
echo "input param error! exit."
exit 1;;
esac
done
echo '{
"region":"cn-east-3",
"tag":"'${BRANCH_TAG}'",
"type":"aosp9",
"name":"'${IMG_NAME}'",
"incrementalBuild":"'${INCREMENTAL}'"
}' > curl_tmp.json
curl -X POST -k --insecure -H "Content-Type: application/json" -H "key: ${KEY}" -d @curl_tmp.json https://${SERVER_ADDR}:8081/image/build &
build_pid=$!
function quit_build ()
{
echo "quit command caught, stop building..."
curl -X POST -k --insecure -H "key: ${KEY}" https://${SERVER_ADDR}:8081/stop_build
kill -9 $build_pid
echo '\n'
}
trap "quit_build" SIGINT
until false
do
sleep 5
is_running=$(ps | grep $build_pid)
if [ "${is_running}" == "" ]; then
rm curl_tmp.json
break
fi
curl -X POST -k --insecure -H "key: ${KEY}" https://${SERVER_ADDR}:8081/get_log
done
Java
1
https://gitee.com/HuaweiCloudDeveloper/huaweicloud-cloud-phone-aosp9.git
git@gitee.com:HuaweiCloudDeveloper/huaweicloud-cloud-phone-aosp9.git
HuaweiCloudDeveloper
huaweicloud-cloud-phone-aosp9
huaweicloud-cloudPhone-aosp9
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891