Skip to content

Commit

Permalink
Merge pull request #29 from nanoframework/release-v1.10.0
Browse files Browse the repository at this point in the history
Release release-v1.10.0

***PUBLISH_RELEASE***
  • Loading branch information
josesimoes authored Feb 24, 2020
2 parents 6177edd + 6169977 commit 3c29a6a
Show file tree
Hide file tree
Showing 349 changed files with 175 additions and 1,255 deletions.
1 change: 1 addition & 0 deletions artifacts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Build outputs go here. Doing a build.cmd/build.sh generates artifacts here (nupkgs, dlls, pdbs, etc.)
148 changes: 77 additions & 71 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
##############################
- job: Check_Build_Options
pool:
vmImage: 'VS2017-Win2016'
vmImage: 'windows-2019'

steps:

Expand Down Expand Up @@ -47,68 +47,74 @@ jobs:
condition: or( eq( variables['StartReleaseCandidate'], true ), ne(variables['system.pullrequest.isfork'], true) )
displayName: Install NBGV tool

- powershell: |
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)"))))"
cd "$env:Agent_TempDirectory" > $null
git init "$env:Agent_TempDirectory\repo"
cd repo > $null
git remote add origin "$env:Build_Repository_Uri"
git config --global gc.auto 0
git config --global user.name nfbot
git config --global user.email [email protected]
git config --global core.autocrlf true
git -c http.extraheader="AUTHORIZATION: $auth" fetch --progress origin
git checkout develop
cd source
# prepare release and capture output
$release = nbgv prepare-release
# get commit message for the merge
$commitMessage = git log -1 --pretty=%B
# amend commit message to skip build
git commit --amend -m "$commitMessage" -m "***NO_CI***" > $null
# push all changes to github
git -c http.extraheader="AUTHORIZATION: $auth" push --all origin
# get release branch name
$branch = $release.Split(' ')[0]
# start PR for release
$prRequestBody = @{title="Release $branch";body="";head="$branch";base="master"} | ConvertTo-Json
$githubApiEndpoint = "https://api.github.com/repos/$env:Build_Repository_Name/pulls"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$headers = @{}
$headers.Add("Authorization","$auth")
$headers.Add("Accept","application/vnd.github.symmetra-preview+json")
try
{
$result = Invoke-RestMethod -Method Post -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer -Uri $githubApiEndpoint -Header $headers -ContentType "application/json" -Body $prRequestBody
'Started PR for new release...' | Write-Host -NoNewline
'OK' | Write-Host -ForegroundColor Green
}
catch
{
$result = $_.Exception.Response.GetResponseStream()
$reader = New-Object System.IO.StreamReader($result)
$reader.BaseStream.Position = 0
$reader.DiscardBufferedData()
$responseBody = $reader.ReadToEnd();
"Error starting PR: $responseBody" | Write-Host -ForegroundColor Red
}
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)"))))"
cd "$env:Agent_TempDirectory" > $null
Write-Host "Cloning from: $env:BUILD_REPOSITORY_URI"
git clone $env:BUILD_REPOSITORY_URI repo
cd repo > $null
git config --global gc.auto 0
git config --global user.name nfbot
git config --global user.email [email protected]
git config --global core.autocrlf true
Write-Host "Checkout develop branch..."
git checkout --quiet develop > $null
# prepare release and capture output
Write-Host "Prepare release with NBGV..."
$release = nbgv prepare-release -p source
Write-Host "Prepare commit..."
# get commit message for the merge
$commitMessage = git log -1 --pretty=%B

# amend commit message to skip build
git commit --amend -m "$commitMessage" -m "***NO_CI***" > $null

Write-Host "Pushing changes to GitHub..."
# push all changes to github
git -c http.extraheader="AUTHORIZATION: $auth" push --quiet --all origin

# get release branch name
$branch = $release.Split(' ')[0]

Write-Host "Prepare PR..."
# start PR for release
$prRequestBody = @{title="Release $branch";body="";head="$branch";base="master"} | ConvertTo-Json
$githubApiEndpoint = "https://api.github.com/repos/$env:BUILD_REPOSITORY_NAME/pulls"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

$headers = @{}
$headers.Add("Authorization","$auth")
$headers.Add("Accept","application/vnd.github.symmetra-preview+json")

try
{
$result = Invoke-RestMethod -Method Post -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer -Uri $githubApiEndpoint -Header $headers -ContentType "application/json" -Body $prRequestBody
'Started PR for new release...' | Write-Host -NoNewline
'OK' | Write-Host -ForegroundColor Green
}
catch
{
$result = $_.Exception.Response.GetResponseStream()
$reader = New-Object System.IO.StreamReader($result)
$reader.BaseStream.Position = 0
$reader.DiscardBufferedData()
$responseBody = $reader.ReadToEnd();

"Error starting PR: $responseBody" | Write-Host -ForegroundColor Red
}
workingDirectory: $(Agent.TempDirectory)
ignoreLASTEXITCODE: true
condition: eq( variables['StartReleaseCandidate'], true )
displayName: NBGV prepare release

Expand All @@ -120,13 +126,13 @@ jobs:
- Check_Build_Options

pool:
vmImage: 'VS2017-Win2016'
vmImage: 'windows-2019'

variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
buildPlatform: 'Any CPU'
buildPlatform: 'x64'
buildConfiguration: 'Release'
solution: 'source\nanoFirmwareFlasher.sln'
solution: 'nanoFirmwareFlasher.sln'

steps:

Expand All @@ -144,10 +150,10 @@ jobs:
versionSpec: '4.9.3'
displayName: 'Install specifc version of NuGet'

- task: DotNetCoreInstaller@0
- task: UseDotNet@2
inputs:
packageType: sdk
version: 2.1.500
version: 3.1.101
displayName: Install .NET Core SDK

- task: DotNetCoreCLI@2
Expand All @@ -160,11 +166,11 @@ jobs:
workingDirectory: source
displayName: Restore NuGet packages

- script: dotnet build -c $(BuildConfiguration) /p:PublicRelease=true --no-restore /t:build,pack
- script: dotnet build -r win-x64 -c $(BuildConfiguration) /p:PublicRelease=true --no-restore /t:build,pack
workingDirectory: source
displayName: Build NuGet package

- script: dotnet build -c $(BuildConfiguration) /p:PublicRelease=true /p:PackGlobalTool=true --no-restore /t:build,pack"
- script: dotnet pack --runtime win-x64 -c $(BuildConfiguration) -p:PublicRelease=true -p:PackGlobalTool=true --no-restore
workingDirectory: source
displayName: Build .NET Core Tool NuGet package

Expand Down Expand Up @@ -327,7 +333,7 @@ jobs:
condition: or( failed('Check_Build_Options'), failed('Build_tool') )

pool:
vmImage: 'VS2017-Win2016'
vmImage: 'windows-2019'

steps:

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added lib/stdfu/x64/STDFU.dll
Binary file not shown.
Binary file added lib/stdfu/x64/STTubeDevice30.dll
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3c29a6a

Please sign in to comment.