代码拉取完成,页面将自动刷新
#!/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}"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。