Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build updates #118

Merged
merged 1 commit into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions .vsts-shared.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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.