Skip to content
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
4 changes: 2 additions & 2 deletions src/Microsoft.Azure.Functions.PowerShellWorker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Licensed under the MIT license. See LICENSE file in the project root for full li
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.Core" Version="1.20.1" />
<PackageReference Include="Grpc.Core" Version="2.27.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.0.0" />
<PackageReference Include="CommandLineParser" Version="2.3.0" />
<PackageReference Include="Google.Protobuf" Version="3.7.0" />
<PackageReference Include="Google.Protobuf" Version="3.11.4" />
</ItemGroup>

<ItemGroup>
Expand Down
19 changes: 8 additions & 11 deletions tools/helper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ $IsWindowsEnv = [RuntimeInformation]::IsOSPlatform([OSPlatform]::Windows)
$RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path
$MinimalSDKVersion = '3.1.1'
$LocalDotnetDirPath = if ($IsWindowsEnv) { "$env:LocalAppData\Microsoft\dotnet" } else { "$env:HOME/.dotnet" }
$GrpcToolsVersion = '2.27.0' # grpc.tools
$GoogleProtobufToolsVersion = '3.11.4' # google.protobuf.tools

function Find-Dotnet
{
Expand Down Expand Up @@ -141,29 +143,24 @@ function Resolve-ProtoBufToolPath
}

$Script:protoc_Path =
Get-ChildItem "$nugetPath/grpc.tools/*/$protoc_Name" -Recurse |
Where-Object FullName -Like "*$plat_arch_Name*" |
Sort-Object -Property FullName -Descending |
Select-Object -First 1 | ForEach-Object FullName
Resolve-Path "$nugetPath/grpc.tools/$GrpcToolsVersion/tools/$plat_arch_Name/$protoc_Name" |
ForEach-Object Path

if (-not $Script:protoc_Path) {
throw "Couldn't find the executable 'protoc'. Check if the package 'grpc.tools' has been restored."
}

$Script:grpc_csharp_plugin_Path =
Get-ChildItem "$nugetPath/grpc.tools/*/$grpc_csharp_plugin_Name" -Recurse |
Where-Object FullName -Like "*$plat_arch_Name*" |
Sort-Object -Property FullName -Descending |
Select-Object -First 1 | ForEach-Object FullName
Resolve-Path "$nugetPath/grpc.tools/$GrpcToolsVersion/tools/$plat_arch_Name/$grpc_csharp_plugin_Name" |
ForEach-Object Path

if (-not $Script:grpc_csharp_plugin_Path) {
throw "Couldn't find the executable 'grpc_csharp_plugin'. Check if the package 'grpc.tools' has been restored."
}

$Script:google_protobuf_tools_Path =
Get-ChildItem "$nugetPath/google.protobuf.tools/*/tools" |
Sort-Object -Property FullName -Descending |
Select-Object -First 1 | ForEach-Object FullName
Resolve-Path "$nugetPath/google.protobuf.tools/$GoogleProtobufToolsVersion/tools" |
ForEach-Object Path

if (-not $Script:google_protobuf_tools_Path) {
throw "Couldn't find the protobuf tools. Check if the package 'google.protobuf.tools' has been restored."
Expand Down
4 changes: 2 additions & 2 deletions tools/protobuf.tools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Licensed under the MIT license. See LICENSE file in the project root for full li
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.Tools" Version="1.15.0" />
<PackageReference Include="Google.Protobuf.Tools" Version="3.6.1" />
<PackageReference Include="Grpc.Tools" Version="2.27.0" />
<PackageReference Include="Google.Protobuf.Tools" Version="3.11.4" />
</ItemGroup>

</Project>