diff --git a/.editorconfig b/.editorconfig index 0ccff01d..32c8ff96 100755 --- a/.editorconfig +++ b/.editorconfig @@ -6,6 +6,9 @@ # "run cleanup": https://betterprogramming.pub/enforce-net-code-style-with-editorconfig-d2f0d79091ac # TODO: build real editorconfig file: https://github.com/dotnet/roslyn/blob/main/.editorconfig +# Make field +dotnet_diagnostic.IDE0044.severity = warning + # Enable naming rule violation errors on build (alternative: dotnet_analyzer_diagnostic.category-Style.severity = error) dotnet_diagnostic.IDE1006.severity = error diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index a8413e61..94323bfa 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -60,8 +60,8 @@ jobs: run: | (cd src/Nexus.UI && libman restore) dotnet publish -c Release -o app /p:GeneratePackage=true src/Nexus/Nexus.csproj - python -m build --wheel --outdir artifacts/packages --no-isolation src/clients/python-client - python -m build --wheel --outdir artifacts/packages --no-isolation src/extensibility/python-extensibility + python -m build --wheel --outdir artifacts/package --no-isolation src/clients/python-client + python -m build --wheel --outdir artifacts/package --no-isolation src/extensibility/python-extensibility - name: Test run: | @@ -90,7 +90,7 @@ jobs: name: artifacts path: | artifacts/*.txt - artifacts/packages/ + artifacts/package/ artifacts/images/ - name: Prepare GitHub Pages @@ -129,12 +129,12 @@ jobs: run: docker load --input artifacts/images/nexus_image.tar - name: Nuget package (MyGet) - run: dotnet nuget push 'artifacts/packages/*.nupkg' --api-key ${MYGET_API_KEY} --source https://www.myget.org/F/apollo3zehn-dev/api/v3/index.json + run: dotnet nuget push 'artifacts/package/*.nupkg' --api-key ${MYGET_API_KEY} --source https://www.myget.org/F/apollo3zehn-dev/api/v3/index.json env: MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }} - name: Python package (MyGet) - run: 'for filePath in artifacts/packages/*.whl; do curl -k -X POST https://www.myget.org/F/apollo3zehn-dev/python/upload -H "Authorization: Bearer ${MYGET_API_KEY}" -F "data=@$filePath"; done' + run: 'for filePath in artifacts/package/*.whl; do curl -k -X POST https://www.myget.org/F/apollo3zehn-dev/python/upload -H "Authorization: Bearer ${MYGET_API_KEY}" -F "data=@$filePath"; done' env: MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }} @@ -179,12 +179,12 @@ jobs: body_path: artifacts/tag_body.txt - name: Nuget package (Nuget) - run: dotnet nuget push 'artifacts/packages/*.nupkg' --api-key ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json + run: dotnet nuget push 'artifacts/package/*.nupkg' --api-key ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - name: Python Package (PyPI) - run: twine upload artifacts/packages/*.whl -u__token__ -p"${PYPI_API_KEY}" + run: twine upload artifacts/package/*.whl -u__token__ -p"${PYPI_API_KEY}" env: PYPI_API_KEY: ${{ secrets.PYPI_API_KEY }} diff --git a/src/Nexus/Services/DataService.cs b/src/Nexus/Services/DataService.cs index 0a1391b9..e51d60b2 100644 --- a/src/Nexus/Services/DataService.cs +++ b/src/Nexus/Services/DataService.cs @@ -1,5 +1,4 @@ -using System.Buffers; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.IO.Compression; using System.IO.Pipelines; using System.Security.Claims; @@ -346,7 +345,7 @@ private async Task CreateFilesAsync( } catch { - cts.Cancel(); + await cts.CancelAsync(); throw; } }