mirror of
https://github.com/Prowlarr/Indexers.git
synced 2025-12-20 02:58:28 +00:00
Fixed: separate general yml conflicts from definition conflicts
This commit is contained in:
@@ -618,15 +618,16 @@ resolve_conflicts() {
|
|||||||
|
|
||||||
if [ -n "$yml_conflicts" ]; then
|
if [ -n "$yml_conflicts" ]; then
|
||||||
log "DEBUG" "YML conflict exists; [$yml_conflicts]"
|
log "DEBUG" "YML conflict exists; [$yml_conflicts]"
|
||||||
handle_yml_conflicts
|
handle_general_yml_conflicts
|
||||||
|
handle_definition_conflicts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Final check and resolution of any remaining unmerged files
|
# Final check and resolution of any remaining unmerged files
|
||||||
resolve_unmerged_files
|
resolve_unmerged_files
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_yml_conflicts() {
|
handle_general_yml_conflicts() {
|
||||||
# Handle non-definition YAML conflicts first
|
# Remove non-definition YAML files (config files, workflows, etc.)
|
||||||
yml_remove=$(git status --porcelain | grep yml | grep -vi "definitions/" | grep -vi "Definitions/" | grep -v "definitions-update" | awk -F '[ADUMRC]{1,2} ' '{print $2}' | awk '{ gsub(/^[ \t]+|[ \t]+$/, ""); print }')
|
yml_remove=$(git status --porcelain | grep yml | grep -vi "definitions/" | grep -vi "Definitions/" | grep -v "definitions-update" | awk -F '[ADUMRC]{1,2} ' '{print $2}' | awk '{ gsub(/^[ \t]+|[ \t]+$/, ""); print }')
|
||||||
|
|
||||||
if [ -n "$yml_remove" ]; then
|
if [ -n "$yml_remove" ]; then
|
||||||
@@ -638,8 +639,10 @@ handle_yml_conflicts() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
# Re-check for remaining conflicts after cleanup
|
|
||||||
|
handle_definition_conflicts() {
|
||||||
|
# Handle indexer definition conflicts with special logic
|
||||||
yml_conflicts=$($GIT_DIFF_CMD | grep "\.yml" || true)
|
yml_conflicts=$($GIT_DIFF_CMD | grep "\.yml" || true)
|
||||||
if [ -n "$yml_conflicts" ]; then
|
if [ -n "$yml_conflicts" ]; then
|
||||||
yml_defs=$(git status --porcelain | grep yml | grep -i "definitions/")
|
yml_defs=$(git status --porcelain | grep yml | grep -i "definitions/")
|
||||||
|
|||||||
Reference in New Issue
Block a user