From 56d2e6cafa9999a82a054ea9246dbbc1a3f6414d Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Tue, 25 Jan 2022 20:05:55 +0100 Subject: [PATCH] CI: remove code for detecting the added commits We want to move all this to Python in the long run, and this functionality isn't very usefull, so removing it makes porting easier. --- .ci/ci-build.sh | 3 +-- .ci/ci-library.sh | 31 ------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/.ci/ci-build.sh b/.ci/ci-build.sh index 14e210050f..84b9fea555 100644 --- a/.ci/ci-build.sh +++ b/.ci/ci-build.sh @@ -21,9 +21,8 @@ sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf pacman --noconfirm -Fy # Detect -list_commits || failure 'Could not detect added commits' list_packages || failure 'Could not detect changed files' -message 'Processing changes' "${commits[@]}" +message 'Processing changes' test -z "${packages}" && success 'No changes in package recipes' # Build diff --git a/.ci/ci-library.sh b/.ci/ci-library.sh index 5770351b40..18117da39e 100644 --- a/.ci/ci-library.sh +++ b/.ci/ci-library.sh @@ -24,32 +24,6 @@ _status() { printf "${items:+\t%s\n}" "${items:+${items[@]}}" } -# Convert lines to array -_as_list() { - local -n nameref_list="${1}" - local filter="${2}" - local strip="${3}" - local lines="${4}" - local result=1 - nameref_list=() - while IFS= read -r line; do - test -z "${line}" && continue - result=0 - [[ "${line}" = ${filter} ]] && nameref_list+=("${line/${strip}/}") - done <<< "${lines}" - return "${result}" -} - -# Changes since master or from head -_list_changes() { - local list_name="${1}" - local filter="${2}" - local strip="${3}" - local git_options=("${@:4}") - _as_list "${list_name}" "${filter}" "${strip}" "$(git log "${git_options[@]}" upstream/master.. | sort -u)" || - _as_list "${list_name}" "${filter}" "${strip}" "$(git log "${git_options[@]}" HEAD^.. | sort -u)" -} - # Git configuration git_config() { local name="${1}" @@ -73,11 +47,6 @@ execute(){ cd - > /dev/null } -# Added commits -list_commits() { - _list_changes commits '*' '#*::' --pretty=format:'%ai::[%h] %s' -} - # Get changed packages in correct build order list_packages() { # readarray doesn't work with a plain pipe