diff --git a/.vsts-shared.yml b/.vsts-shared.yml index 338da85..e2a846c 100644 --- a/.vsts-shared.yml +++ b/.vsts-shared.yml @@ -2,25 +2,17 @@ parameters: signSteps: [] steps: -- task: BatchScript@1 - displayName: Setup Environment Variables +- task: DotNetCoreCLI@2 inputs: - filename: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Tools\\VsDevCmd.bat" - arguments: -no_logo - modifyEnvironment: true + command: custom + custom: tool + arguments: install --tool-path . nbgv + displayName: Install NBGV tool + condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false)) -- task: NuGetToolInstaller@0 - displayName: Put NuGet in Path - inputs: - versionSpec: 4.7.0 - -- task: DotNetCoreCLI@2 +- script: nbgv cloud displayName: Set Version - condition: eq(variables['system.pullrequest.isfork'], false) - inputs: - command: build - projects: Tools\SetVersion.csproj - arguments: -c $(BuildConfiguration) + condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false)) - powershell: | mkdir $Env:Temp\Packages -Force @@ -40,7 +32,7 @@ steps: - task: PublishBuildArtifacts@1 displayName: Publish Artifacts - condition: eq(variables['system.pullrequest.isfork'], false) + condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false)) inputs: pathToPublish: $(Build.ArtifactStagingDirectory)\Packages artifactType: container diff --git a/Tools/SetVersion.csproj b/Tools/SetVersion.csproj deleted file mode 100644 index 0729a02..0000000 --- a/Tools/SetVersion.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - netstandard2.0 - - - - - - - \ No newline at end of file diff --git a/Tools/Sign-Package.ps1 b/Tools/Sign-Package.ps1 index b7ecd59..5123d7f 100644 --- a/Tools/Sign-Package.ps1 +++ b/Tools/Sign-Package.ps1 @@ -1,6 +1,4 @@ - $currentDirectory = split-path $MyInvocation.MyCommand.Definition -$repoDirectory = "$currentDirectory\..\" # See if we have the ClientSecret available if ([string]::IsNullOrEmpty($env:SignClientSecret)) { @@ -8,17 +6,16 @@ if ([string]::IsNullOrEmpty($env:SignClientSecret)) { return; } -& nuget install SignClient -Version 0.9.1 -SolutionDir "$repoDirectory" -Verbosity quiet -ExcludeVersion +dotnet tool install --tool-path . SignClient # Setup Variables we need to pass into the sign client tool - $appSettings = "$currentDirectory\SignClient.json" -$appPath = "$repoDirectory\packages\SignClient\tools\netcoreapp2.0\SignClient.dll" + $nupgks = Get-ChildItem $Env:ArtifactDirectory\*.nupkg | Select-Object -ExpandProperty FullName foreach ($nupkg in $nupgks) { Write-Host "Submitting $nupkg for signing" - dotnet $appPath 'sign' -c $appSettings -i $nupkg -r $env:SignClientUser -s $env:SignClientSecret -n 'MSBuild.Sdk.Extras' -d 'MSBuild.Sdk.Extras' -u 'https://github.com/onovotny/MSBuildSdkExtras' + .\SignClient 'sign' -c $appSettings -i $nupkg -r $env:SignClientUser -s $env:SignClientSecret -n 'MSBuild.Sdk.Extras' -d 'MSBuild.Sdk.Extras' -u 'https://github.com/onovotny/MSBuildSdkExtras' Write-Host "Finished signing $nupkg" } diff --git a/Tools/version.json b/Tools/version.json deleted file mode 100644 index 7f45243..0000000 --- a/Tools/version.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "inherit": true, - "cloudBuild": { - "buildNumber": { - "enabled": true - } - } -} \ No newline at end of file