Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix/m1 #1973

Merged
merged 5 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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