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.
This commit is contained in:
Christoph Reiter
2022-01-25 20:05:55 +01:00
committed by foo
parent 7668d69943
commit 56d2e6cafa
2 changed files with 1 additions and 33 deletions

View File

@@ -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

View File

@@ -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