Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
allow skipping a companion check
overcome the companion build system's shortcomings: #3 (comment)
  • Loading branch information
joao-paulo-parity committed Oct 20, 2021
commit ba07a72948fda26cdee7c0d922bdcf5d9726bb7b
21 changes: 16 additions & 5 deletions check_dependent_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,23 @@ main() {

while IFS= read -r line; do
last_line="$line"
if ! [[ "$line" =~ [cC]ompanion:[[:space:]]*([^[:space:]]+) ]]; then
continue
fi

echo "detected companion in PR description: ${BASH_REMATCH[1]}"
process_companion_pr "${BASH_REMATCH[1]}"
if [[ "$line" =~ [cC]ompanion:[[:space:]]*([^[:space:]]+) ]]; then
echo "Detected companion in PR description: ${BASH_REMATCH[1]}"
process_companion_pr "${BASH_REMATCH[1]}"
elif [[ "$line" =~ skip[^[:alnum:]]+([^[:space:]]+) ]]; then
# FIXME: This escape hatch should be removed at some point when the
# companion build system is able to deal with all edge cases, such as
# the one described in
# https://github.com/paritytech/pipeline-scripts/issues/3#issuecomment-947539791
if [[
"${BASH_REMATCH[1]}" = "$CI_JOB_NAME" ||
"${BASH_REMATCH[1]}" = "continuous-integration/gitlab-$CI_JOB_NAME"
]]; then
echo "Skipping $CI_JOB_NAME as specified in the PR description"
exit
fi
fi
done < <(curl \
-sSL \
-H "Authorization: token $GITHUB_TOKEN" \
Expand Down