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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user