mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
.Net: Skipping formatting of excluded projects (#3941)
The `dotnet-format` workflow fails on temporarily excluded project files: - "Planners.Core.csproj" - "Planners.Core.UnitTests.csproj" - "Experimental.Orchestration.Flow.csproj" - "Experimental.Orchestration.Flow.UnitTests.csproj" - "Experimental.Orchestration.Flow.IntegrationTests.csproj" This PR excludes the projects from formatting.
This commit is contained in:
@@ -56,13 +56,17 @@ jobs:
|
||||
if: github.event_name != 'pull_request' || steps.changed-files.outputs.added_modified != '' || steps.changed-files.outcome == 'failure'
|
||||
run: |
|
||||
csproj_files=()
|
||||
exclude_files=("Planners.Core.csproj" "Planners.Core.UnitTests.csproj" "Experimental.Orchestration.Flow.csproj" "Experimental.Orchestration.Flow.UnitTests.csproj" "Experimental.Orchestration.Flow.IntegrationTests.csproj")
|
||||
if [[ ${{ steps.changed-files.outcome }} == 'success' ]]; then
|
||||
for file in ${{ steps.changed-files.outputs.added_modified }}; do
|
||||
echo "$file was changed"
|
||||
dir="./$file"
|
||||
while [[ $dir != "." && $dir != "/" && $dir != $GITHUB_WORKSPACE ]]; do
|
||||
if find "$dir" -maxdepth 1 -name "*.csproj" -print -quit | grep -q .; then
|
||||
csproj_files+=("$(find "$dir" -maxdepth 1 -name "*.csproj" -print -quit)")
|
||||
csproj_path="$(find "$dir" -maxdepth 1 -name "*.csproj" -print -quit)"
|
||||
if [[ ! "${exclude_files[@]}" =~ "${csproj_path##*/}" ]]; then
|
||||
csproj_files+=("$csproj_path")
|
||||
fi
|
||||
break
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user