Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow build & check packages in addition to changed templates #47887

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
BOOTSTRAP: '${{ matrix.config.host }}'
TEST: '${{ matrix.config.test }}'
HOSTREPO: /hostrepo
PR_TITLE: '${{ github.event.pull_request.title }}'
PR_BODY: '${{ github.event.pull_request.body }}'

strategy:
fail-fast: false
Expand Down
11 changes: 11 additions & 0 deletions common/travis/changed_templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
# changed_templates.sh

ci_check=$( echo -e "$PR_TITLE\n$PR_BODY" |
sed -ne 's/.*\[ci \+check \+\([^]]*[^ ]\) *].*/\1/p' )

tip="$(git rev-list -1 --parents HEAD)"
case "$tip" in
# This is a merge commit, pick last parent
Expand All @@ -27,3 +30,11 @@ git diff-tree -r --no-renames --name-only --diff-filter=AM \
xargs ./xbps-src sort-dependencies |
tee /tmp/templates |
sed "s/^/ /" >&2

if [ -n "$ci_check" ]; then
/bin/echo -e '\x1b[32mAdditional packages to build and check:\x1b[0m'
printf "%s\n" $ci_check |
xargs ./xbps-src sort-dependencies |
tee -a /tmp/templates |
sed "s/^/ /" >&2
fi