From 21664965a09792132ec69530dd78d2e61fb91f09 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Tue, 5 Nov 2024 16:13:38 +0300 Subject: [PATCH 1/2] fix release tool signing --- .azure-pipelines/ci-build.yml | 3 +++ scripts/enable-shims-for-packaging.ps1 | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 scripts/enable-shims-for-packaging.ps1 diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 6dc9012172..6e85d6d10c 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -163,6 +163,9 @@ extends: - pwsh: $(Build.SourcesDirectory)/scripts/get-prerelease-version.ps1 -currentBranch $(Build.SourceBranch) -previewBranch ${{ parameters.previewBranch }} -excludeHeadingDash displayName: "Set version suffix" + - pwsh: $(Build.SourcesDirectory)/scripts/enable-shims-for-packaging.ps1" + displayName: "Add PackAsToolShimRuntimeIdentifiers attributes for tool packaging" + - pwsh: $(Build.SourcesDirectory)/scripts/update-version-suffix-for-source-generator.ps1 -versionSuffix "$(versionSuffix)" displayName: "Set version suffix in csproj for generators" diff --git a/scripts/enable-shims-for-packaging.ps1 b/scripts/enable-shims-for-packaging.ps1 new file mode 100644 index 0000000000..cd01e308c1 --- /dev/null +++ b/scripts/enable-shims-for-packaging.ps1 @@ -0,0 +1,13 @@ +# This script enables the shims for packaging the project as a tool +$csprojPath = Join-Path $PSScriptRoot "../src/kiota/kiota.csproj" + +$xml = [Xml] (Get-Content $csprojPath) + +$shimIdentifiers = $xml.CreateElement("PackAsToolShimRuntimeIdentifiers") +$shimIdentifiers.InnerText = "win-x64;win-x86;osx-x64" + +$rootPropertyGroup = $xml.Project.PropertyGroup[0] +$rootPropertyGroup.AppendChild($shimIdentifiers) + +#save xml to csproj +$xml.Save($csprojPath) \ No newline at end of file From 998eb696f66fc317ef466c602da027a2e750dbad Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Tue, 5 Nov 2024 16:39:59 +0300 Subject: [PATCH 2/2] fix typo in ci build. update changelog --- .azure-pipelines/ci-build.yml | 2 +- CHANGELOG.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 6e85d6d10c..898c03946a 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -163,7 +163,7 @@ extends: - pwsh: $(Build.SourcesDirectory)/scripts/get-prerelease-version.ps1 -currentBranch $(Build.SourceBranch) -previewBranch ${{ parameters.previewBranch }} -excludeHeadingDash displayName: "Set version suffix" - - pwsh: $(Build.SourcesDirectory)/scripts/enable-shims-for-packaging.ps1" + - pwsh: $(Build.SourcesDirectory)/scripts/enable-shims-for-packaging.ps1 displayName: "Add PackAsToolShimRuntimeIdentifiers attributes for tool packaging" - pwsh: $(Build.SourcesDirectory)/scripts/update-version-suffix-for-source-generator.ps1 -versionSuffix "$(versionSuffix)" diff --git a/CHANGELOG.md b/CHANGELOG.md index 171110e1f6..950b1ccea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,9 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Changed + - Fixed python generation client serailization failure str being quoted as "str" - Fixed Issue with primitive values being stringified in python python. [#5417](https://github.com/microsoft/kiota/issues/5417) - - Fixed an issue where multipart request content would be ignored if other unstructured content was present in the description. [#5638](https://github.com/microsoft/kiota/issues/5638) - Fixed an issue where when generating Go code the deserializer for unions was using `CodeClass` as a filter and not `CodeInterface`. [#4844](https://github.com/microsoft/kiota/issues/4844) - Fixes mapping of `int16` format to the `integer` type rather than `double` when the type is `integer` or `number` [#5611](https://github.com/microsoft/kiota/issues/5611) @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed a bug where the type name for inherited inline models would be incorrect. [#5610](https://github.com/microsoft/kiota/issues/5610) - Fixes typing inconsistencies in generated code and libraries in Python [kiota-python#333](https://github.com/microsoft/kiota-python/issues/333) - Fixes generation of superfluous fields for Models with discriminator due to refiners adding the same properties to the same model [#4178](https://github.com/microsoft/kiota/issues/4178). +- Fixes unsigned shim binary when installed as dotnet tool [#5650](https://github.com/microsoft/kiota/issues/5650). ## [1.19.1] - 2024-10-11