Skip to content

Commit

Permalink
build updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Oren Novotny committed Sep 10, 2018
1 parent 2c33705 commit 9212ca9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 42 deletions.
26 changes: 9 additions & 17 deletions .vsts-shared.yml
Expand Up @@ -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
Expand All @@ -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
Expand Down
11 changes: 0 additions & 11 deletions Tools/SetVersion.csproj

This file was deleted.

9 changes: 3 additions & 6 deletions Tools/Sign-Package.ps1
@@ -1,24 +1,21 @@

$currentDirectory = split-path $MyInvocation.MyCommand.Definition
$repoDirectory = "$currentDirectory\..\"

# See if we have the ClientSecret available
if ([string]::IsNullOrEmpty($env:SignClientSecret)) {
Write-Host "Client Secret not found, not signing packages"
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"
}

Expand Down
8 changes: 0 additions & 8 deletions Tools/version.json

This file was deleted.

0 comments on commit 9212ca9

Please sign in to comment.