Skip to content

Commit

Permalink
Merge pull request #1973 from microsoft/bugfix/m1
Browse files Browse the repository at this point in the history
bugfix/m1
  • Loading branch information
baywet authored Jan 4, 2023
2 parents bac004b + 4b1236e commit 5c0f390
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@ jobs:
if: contains(github.ref, 'refs/tags/v')
env:
BRANCH_NAME: ${{ github.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Push to GitHub Packages - Nightly
if: contains(github.ref, 'refs/head/main')
uses: docker/[email protected]
with:
push: true
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,windows/amd64
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly
- name: Push to GitHub Packages - Release
if: contains(github.ref, 'refs/tags/v')
uses: docker/[email protected]
with:
push: true
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,windows/amd64
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Fixed container support for MacOS M1. [#1888](https://github.com/microsoft/kiota/issues/1888)
- Fixed a bug where a missing baseURL would make search fail. [#2095](https://github.com/microsoft/kiota/issues/2095)
- Fixed a bug in Ruby where the request adapter URL would be overwritten by the client defaults. [#1647](https://github.com/microsoft/kiota/issues/1647)
- Replaced concurrent-ruby by Fibers in Ruby libraries to implement proper asynchronous execution of requests.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
WORKDIR /app

COPY ./src ./kiota/src
Expand Down
6 changes: 5 additions & 1 deletion src/Kiota.Builder/KiotaBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ private void CleanOutputDirectory()
if(config.CleanOutput && Directory.Exists(config.OutputPath))
{
logger.LogInformation("Cleaning output directory {path}", config.OutputPath);
Directory.Delete(config.OutputPath, true);
// not using Directory.Delete on the main directory because it's locked when mapped in a container
foreach(var subDir in Directory.EnumerateDirectories(config.OutputPath))
Directory.Delete(subDir, true);
foreach(var subFile in Directory.EnumerateFiles(config.OutputPath))
File.Delete(subFile);
}
}
public async Task<OpenApiUrlTreeNode> GetUrlTreeNodeAsync(CancellationToken cancellationToken) {
Expand Down
2 changes: 1 addition & 1 deletion src/kiota/Handlers/BaseKiotaCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal abstract class BaseKiotaCommandHandler : ICommandHandler
protected KiotaConfiguration Configuration { get => ConfigurationFactory.Value; }
private readonly Lazy<KiotaConfiguration> ConfigurationFactory = new (() => {
var builder = new ConfigurationBuilder();
var configuration = builder.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
var configuration = builder.AddJsonFile("appsettings.json", optional: true, reloadOnChange: false)
.AddEnvironmentVariables(prefix: "KIOTA_")
.Build();
var configObject = new KiotaConfiguration();
Expand Down

0 comments on commit 5c0f390

Please sign in to comment.