当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
23 Star 4 Fork 49

OpenHarmony-SIG/cicd
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
prebuild.sh 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
zhongluping 提交于 2024-10-18 16:46 +08:00 . 增加SDK下载包的校验
#!/bin/bash
# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
export PATH=`pwd`/cicd/js:$PATH
source check_env.sh
function check_git_tools() {
git --version
if [ $? -ne 0 ]
then
apt install git -y
fi
git lfs --version
if [ $? -ne 0 ]
then
git install lfs
fi
# 关闭SSL验证
# git config http.sslverify false
return 0
}
function prepare() {
echo "start prepare CI compile Env"
check_git_tools
prepare_nodejs
if [ $? -ne 0 ]
then
return 1
fi
prepare_ohpm
if [ $? -ne 0 ]
then
return 1
fi
predowload_sdk
if [ $? -ne 0 ]
then
return 1
fi
if [ -z "$1" ]
then
return 0
fi
get_apiversion $1
if [ $? -ne 0 ]
then
return 1
fi
if [ -z "$API_VERSION" ]
then
echo "no need compile"
return 0
fi
prepare_sdk
if [ $? -ne 0 ]
then
return 1
fi
return 0
}
prepare $*
if [ $? -ne 0 ]
then
echo "prepare CI compile Env failed!"
exit 1
fi
#eof
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony-sig/cicd.git
git@gitee.com:openharmony-sig/cicd.git
openharmony-sig
cicd
cicd
tpc_compile

搜索帮助

371d5123 14472233 46e8bd33 14472233