This commit is contained in:
Oren Novotny 2018-09-13 16:00:32 -04:00
Родитель 0e8b0994a6
Коммит 1cda0af7eb
4 изменённых файлов: 20 добавлений и 42 удалений

Просмотреть файл

@ -1,6 +1,5 @@
trigger:
- master
- develop
- rel/*
queue: Hosted VS2017
@ -13,35 +12,33 @@ steps:
modifyEnvironment: true
displayName: Setup Environment Variables
- task: NuGetToolInstaller@0
displayName: Use NuGet 4.6.2
- task: DotNetCoreCLI@2
inputs:
versionSpec: 4.6.2
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
- task: DotNetCoreCLI@2
inputs:
command: build
projects: script/setversion.csproj
arguments: -c Release
- script: nbgv cloud
displayName: Set Version
condition: eq(variables['system.pullrequest.isfork'], false)
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
- powershell: |
nuget install SignClient -Version 0.9.1 -SolutionDir $(Build.SourcesDirectory) -Verbosity quiet -ExcludeVersion
.\build.cmd
- script: build.cmd
displayName: Build
env:
SIGNCLIENT_SECRET: $(SignClientSecret)
SIGNCLIENT_USER: $(SignClientUser)
VSTS_ACCESS_TOKEN: $(System.AccessToken)
COVERALLS_TOKEN: $(COVERALLS_TOKEN)
ArtifactDirectory: $(System.DefaultWorkingDirectory)\artifacts
- task: CopyFiles@2
inputs:
Contents: 'artifacts/*.nupkg'
TargetFolder: '$(build.artifactstagingdirectory)\packages'
flattenFolders: true
condition: eq(variables['system.pullrequest.isfork'], false)
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
- task: PublishBuildArtifacts@1
displayName: Publish Package Artifacts
@ -49,13 +46,13 @@ steps:
pathToPublish: '$(build.artifactstagingdirectory)\packages'
artifactType: container
artifactName: Packages
condition: eq(variables['system.pullrequest.isfork'], false)
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
- task: CopyFiles@2
inputs:
Contents: '**/bin/*'
TargetFolder: '$(build.artifactstagingdirectory)\binaries'
condition: eq(variables['system.pullrequest.isfork'], false)
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
- task: PublishBuildArtifacts@1
displayName: Publish Binaries
@ -63,13 +60,13 @@ steps:
pathToPublish: '$(build.artifactstagingdirectory)\binaries'
artifactType: container
artifactName: Binaries
condition: eq(variables['system.pullrequest.isfork'], false)
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
- task: CopyFiles@2
inputs:
Contents: 'src/ReactiveUI.**/Events_*.cs'
TargetFolder: '$(build.artifactstagingdirectory)\Events'
condition: eq(variables['system.pullrequest.isfork'], false)
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
- task: PublishBuildArtifacts@1
displayName: Publish Generated Events
@ -77,4 +74,4 @@ steps:
pathToPublish: '$(build.artifactstagingdirectory)\Events'
artifactType: container
artifactName: Events
condition: eq(variables['system.pullrequest.isfork'], false)
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))

Просмотреть файл

@ -6,18 +6,17 @@ if([string]::IsNullOrWhitespace($env:SIGNCLIENT_SECRET)){
[System.Environment]::Exit(1);
}
# Setup Variables we need to pass into the sign client tool
dotnet tool install --tool-path . SignClient
# Setup Variables we need to pass into the sign client tool
$appSettings = "$currentDirectory\SignPackages.json"
$appPath = "$currentDirectory\packages\SignClient\tools\netcoreapp2.0\SignClient.dll"
$nupgks = ls $currentDirectory\artifacts\*.nupkg | Select -ExpandProperty FullName
$nupgks = gci $Env:ArtifactDirectory\*.nupkg | Select -ExpandProperty FullName
foreach ($nupkg in $nupgks){
Write-Host "Submitting $nupkg for signing"
dotnet $appPath 'sign' -c $appSettings -i $nupkg -r $env:SIGNCLIENT_USER -s $env:SIGNCLIENT_SECRET -n 'ReactiveUI' -d 'ReactiveUI' -u 'https://reactiveui.net'
.\SignClient 'sign' -c $appSettings -i $nupkg -r $env:SIGNCLIENT_USER -s $env:SIGNCLIENT_SECRET -n 'ReactiveUI' -d 'ReactiveUI' -u 'https://reactiveui.net'
Write-Host "Finished signing $nupkg"
}

Просмотреть файл

@ -1,10 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,8 +0,0 @@
{
"inherit": true,
"cloudBuild": {
"buildNumber": {
"enabled": true
}
}
}