diff --git a/CHANGELOG.md b/CHANGELOG.md index 8db26da..16896d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# viash-actions v5.3.1 + +## Bug fixes + +* `project/detect-changed-components`: Fix components being listed more than once (PR #29). + # viash-actions v5.3.0 ## New functionality diff --git a/project/detect-changed-components/action.yml b/project/detect-changed-components/action.yml index 3ebe041..a873898 100644 --- a/project/detect-changed-components/action.yml +++ b/project/detect-changed-components/action.yml @@ -104,6 +104,7 @@ runs: ' <<< "$component" ) # check if resource is in the list of changed resources + should_add_component=0 for resource in "${resources[@]}"; do echo "Checking resource: $resource" if [ ! -e "$resource" ]; then @@ -121,7 +122,6 @@ runs: fi echo "All resources including files from directories: ${resource_arr[@]}" for changed_file in ${changed_files[@]}; do - should_add_component=0 changed_file_real_path=$(realpath "$changed_file") echo "Using changed file: $changed_file_real_path" for resource_to_check in ${resource_arr[@]}; do @@ -131,12 +131,11 @@ runs: break fi done - if [[ "$should_add_component" -eq 1 ]]; then - output_array+="$component" - break - fi done done + if [[ "$should_add_component" -eq 1 ]]; then + output_array+="$component" + fi done # reformat as json and write to file