Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Required changes for 3.0.0 preview3 (#112)
* Required changes for 3.0.0 preview3 * Add scripts to install dotnet SDK
- Loading branch information
John Luo
committed
Feb 21, 2019
1 parent
f29c274
commit c7ca9ce
Showing
13 changed files
with
145 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,44 @@ | |||
#!/usr/bin/env powershell | |||
|
|||
<# | |||
.PARAMETER Upgrade | |||
Upgrade the version of gRPC packages to be downloaded to the latest on https://packages.grpc.io/ | |||
.NOTES | |||
This function will create a file grpc-lock.txt. This lock file can be committed to source, but does not have to be. | |||
When the lock file is not present, the script will create one using latest available version from https://packages.grpc.io/. | |||
#> | |||
|
|||
param ( | |||
[switch]$Upgrade = $false | |||
) | |||
|
|||
Set-StrictMode -Version 2 | |||
$ErrorActionPreference = 'Stop' | |||
|
|||
# Variables | |||
|
|||
$WorkingDir = $PSScriptRoot | |||
$TempDir = Join-Path $WorkingDir 'obj' | |||
$InstallScriptUrl = 'https://dot.net/v1/dotnet-install.ps1' | |||
$InstallScriptPath = Join-Path $TempDir 'dotnet-install.ps1' | |||
$GlobalJsonPath = Join-Path $WorkingDir '..' | Join-Path -ChildPath 'global.json' | |||
|
|||
# Functions | |||
|
|||
function Ensure-Dir([string]$path) { | |||
if (!(Test-Path $path -PathType Container)) { | |||
New-Item -ItemType Directory -Force -Path $path | Out-Null | |||
} | |||
} | |||
|
|||
# Main | |||
|
|||
# Resolve SDK version | |||
$GlobalJson = Get-Content -Raw $GlobalJsonPath | ConvertFrom-Json | |||
$SDKVersion = $GlobalJson.sdk.version | |||
|
|||
# Download install script | |||
Ensure-Dir $TempDir | |||
Write-Host "Downloading install script: $InstallScriptUrl => $InstallScriptPath" | |||
Invoke-WebRequest -Uri $InstallScriptUrl -OutFile $InstallScriptPath | |||
&$InstallScriptPath -Version $SDKVersion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,29 @@ | |||
#!/usr/bin/env bash | |||
|
|||
set -euo pipefail | |||
|
|||
# variables | |||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |||
OBJDIR="$DIR/obj" | |||
global_json_path="$DIR/../global.json" | |||
install_script_url="https://dot.net/v1/dotnet-install.sh" | |||
install_script_path="$OBJDIR/dotnet-install.sh" | |||
|
|||
# functions | |||
ensure_dir() { | |||
[ -d $1 ] || mkdir $1 | |||
} | |||
|
|||
# main | |||
|
|||
# resolve SDK version | |||
sdk_version=$(jq -r .sdk.version $global_json_path) | |||
|
|||
# download dotnet-install.sh | |||
ensure_dir $OBJDIR | |||
|
|||
echo "Downloading install script: $install_script_url => $install_script_path" | |||
curl -sSL -o $install_script_path $install_script_url | |||
chmod +x $install_script_path | |||
|
|||
$install_script_path -v $sdk_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,5 +1,5 @@ | |||
{ | { | ||
"sdk": { | "sdk": { | ||
"version": "3.0.100-preview-010184" | "version": "3.0.100-preview3-010313" | ||
} | } | ||
} | } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
testassets/FunctionalTestsWebsite/Infrastructure/TestHttpResponseStartFeature.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,32 @@ | |||
#region Copyright notice and license | |||
|
|||
// Copyright 2019 The gRPC Authors | |||
// | |||
// Licensed under the Apache License, Version 2.0 (the "License"); | |||
// you may not use this file except in compliance with the License. | |||
// You may obtain a copy of the License at | |||
// | |||
// http://www.apache.org/licenses/LICENSE-2.0 | |||
// | |||
// Unless required by applicable law or agreed to in writing, software | |||
// distributed under the License is distributed on an "AS IS" BASIS, | |||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
// See the License for the specific language governing permissions and | |||
// limitations under the License. | |||
|
|||
#endregion | |||
|
|||
using System.Threading; | |||
using System.Threading.Tasks; | |||
using Microsoft.AspNetCore.Http.Features; | |||
|
|||
namespace FunctionalTestsWebsite.Infrastructure | |||
{ | |||
internal class TestHttpResponseStartFeature : IHttpResponseStartFeature | |||
{ | |||
public Task StartAsync(CancellationToken token = default(CancellationToken)) | |||
{ | |||
return Task.CompletedTask; | |||
} | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters