Skip to content

Commit 2f42dbf

Browse files
committed
Fix line endings
***NO_CI***
1 parent 6d1ff47 commit 2f42dbf

File tree

3 files changed

+55
-212
lines changed

3 files changed

+55
-212
lines changed

.vs/launch.vs.SAMPLE.json

Lines changed: 0 additions & 90 deletions
This file was deleted.

.vs/tasks.vs.SAMPLE.json

Lines changed: 0 additions & 67 deletions
This file was deleted.
Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
1-
# Copyright (c) .NET Foundation and Contributors
2-
# See LICENSE file in the project root for full license information.
3-
4-
steps:
5-
- task: PowerShell@2
6-
name: Check_mscorlib_test
7-
displayName: Check mscorlib to test
8-
condition: ne(variables['System.PullRequest.PullRequestId'], '')
9-
inputs:
10-
failOnStderr: false
11-
targetType: "inline"
12-
script: |
13-
14-
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
15-
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
16-
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)")))"
17-
18-
# find PR
19-
"Getting PR#$env:System_PullRequest_PullRequestNumber details..." | Write-Host -ForegroundColor White -NoNewline
20-
$pr = Invoke-RestMethod -Uri "https://api.github.com/repos/$env:Build_Repository_Name/pulls/$env:System_PullRequest_PullRequestNumber" -Header @{"Authorization"="$auth"} -ContentType "application/json" -Method GET
21-
22-
23-
if($($pr.number) -eq "$env:System_PullRequest_PullRequestNumber")
24-
{
25-
'##[command] OK' | Write-Host -ForegroundColor Green
26-
}
27-
28-
# grab PR commit message
29-
$prCommitMessage = $($pr.body)
30-
31-
# look for test prompt in PR commit message
32-
# pattern is "Tested against nanoframework/CoreLibrary#NNNN"
33-
34-
if($prCommitMessage -match "Tested against nanoframework/CoreLibrary#(\d+)")
35-
{
36-
$testPR = $matches[1]
37-
"Test PR found: $testPR" | Write-Host -ForegroundColor White
38-
39-
# move to the build sources directory
40-
Set-Location -Path $(Agent.BuildDirectory)/s/CoreLibrary
41-
42-
# need to call this first to setup authentication
43-
gh auth setup-git
44-
45-
# gh auth status
46-
47-
Write-Host "Checking out mscorlib PR: #$testPR"
48-
gh pr checkout $testPR
49-
}
50-
else
51-
{
52-
"No test PR found. Using main branch" | Write-Host -ForegroundColor White
53-
}
54-
env:
55-
GITHUB_TOKEN: $(GitHubToken)
1+
# Copyright (c) .NET Foundation and Contributors
2+
# See LICENSE file in the project root for full license information.
3+
4+
steps:
5+
- task: PowerShell@2
6+
name: Check_mscorlib_test
7+
displayName: Check mscorlib to test
8+
condition: ne(variables['System.PullRequest.PullRequestId'], '')
9+
inputs:
10+
failOnStderr: false
11+
targetType: "inline"
12+
script: |
13+
14+
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
15+
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
16+
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)")))"
17+
18+
# find PR
19+
"Getting PR#$env:System_PullRequest_PullRequestNumber details..." | Write-Host -ForegroundColor White -NoNewline
20+
$pr = Invoke-RestMethod -Uri "https://api.github.com/repos/$env:Build_Repository_Name/pulls/$env:System_PullRequest_PullRequestNumber" -Header @{"Authorization"="$auth"} -ContentType "application/json" -Method GET
21+
22+
23+
if($($pr.number) -eq "$env:System_PullRequest_PullRequestNumber")
24+
{
25+
'##[command] OK' | Write-Host -ForegroundColor Green
26+
}
27+
28+
# grab PR commit message
29+
$prCommitMessage = $($pr.body)
30+
31+
# look for test prompt in PR commit message
32+
# pattern is "Tested against nanoframework/CoreLibrary#NNNN"
33+
34+
if($prCommitMessage -match "Tested against nanoframework/CoreLibrary#(\d+)")
35+
{
36+
$testPR = $matches[1]
37+
"Test PR found: $testPR" | Write-Host -ForegroundColor White
38+
39+
# move to the build sources directory
40+
Set-Location -Path $(Agent.BuildDirectory)/s/CoreLibrary
41+
42+
# need to call this first to setup authentication
43+
gh auth setup-git
44+
45+
# gh auth status
46+
47+
Write-Host "Checking out mscorlib PR: #$testPR"
48+
gh pr checkout $testPR
49+
}
50+
else
51+
{
52+
"No test PR found. Using main branch" | Write-Host -ForegroundColor White
53+
}
54+
env:
55+
GITHUB_TOKEN: $(GitHubToken)

0 commit comments

Comments
 (0)