Skip to content

Commit

Permalink
Consolidate build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Oren Novotny committed Sep 13, 2018
1 parent 0441b8c commit ceda515
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 81 deletions.
28 changes: 12 additions & 16 deletions .vsts-ci.yml → .azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
trigger:
- master
- develop
- rel/*

queue: Hosted VS2017
Expand All @@ -13,40 +12,37 @@ steps:
modifyEnvironment: true
displayName: Setup Environment Variables

- task: NuGetToolInstaller@0
displayName: Use NuGet 4.6.2
- task: DotNetCoreCLI@2
inputs:
versionSpec: 4.6.2

- task: DotNetCoreCLI@2
inputs:
command: build
projects: script/setversion.csproj
arguments: -c Release
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool

- 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
inputs:
pathToPublish: '$(build.artifactstagingdirectory)\packages'
artifactType: container
artifactName: Packages
condition: eq(variables['system.pullrequest.isfork'], false)
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
10 changes: 5 additions & 5 deletions SignPackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ if([string]::IsNullOrWhitespace($env:SIGNCLIENT_SECRET)){
[System.Environment]::Exit(1);
}

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
$nupkgs = gci $Env:ArtifactDirectory\*.nupkg -recurse | Select -ExpandProperty FullName

foreach ($nupkg in $nupgks){
foreach ($nupkg in $nupkgs){
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 $appPath '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"
}
Expand Down
42 changes: 0 additions & 42 deletions appveyor.yml

This file was deleted.

10 changes: 0 additions & 10 deletions script/setversion.csproj

This file was deleted.

8 changes: 0 additions & 8 deletions script/version.json

This file was deleted.

0 comments on commit ceda515

Please sign in to comment.