1 Star 0 Fork 0

zrw_git/quickstart-android

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build_pull_request.sh 839 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
# Exit on error
set -e
# unshallow since GitHub actions does a shallow clone
git fetch --unshallow
git fetch origin
# Get all the modules that were changed
while read line; do
module_name=${line%%/*}
if [[ ${MODULES} != *"${module_name}" ]]; then
MODULES="${MODULES} ${module_name}"
fi
done < <(git diff --name-only origin/$GITHUB_BASE_REF)
changed_modules=$MODULES
# Get a list of all available gradle tasks
AVAILABLE_TASKS=$(./gradlew tasks --all)
# Check if these modules have gradle tasks
build_commands=""
for module in $changed_modules
do
if [[ $AVAILABLE_TASKS =~ $module":app:" ]]; then
build_commands=${build_commands}" :"${module}":app:assembleDebug :"${module}":app:check"
fi
done
# Build
echo "Building Pull Request with"
echo $build_commands
eval "./gradlew clean ktlint ${build_commands}"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zrw_git/quickstart-android.git
[email protected]:zrw_git/quickstart-android.git
zrw_git
quickstart-android
quickstart-android
master

搜索帮助