Skip to content

Commit

Permalink
Use nbgv tool instead of project
Browse files Browse the repository at this point in the history
  • Loading branch information
Oren Novotny committed Jul 1, 2018
1 parent 2e45bca commit 47c250d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 32 deletions.
27 changes: 16 additions & 11 deletions .vsts-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ parameters:
signSteps: []

steps:
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))

- script: nbgv cloud
displayName: Set Version
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))

- task: DotNetCoreInstaller@0
inputs:
version: '2.1.400-preview-008975'
Expand All @@ -10,14 +22,6 @@ steps:
displayName: Use NuGet 4.7.0
inputs:
versionSpec: 4.7.0

- task: DotNetCoreCLI@2
inputs:
command: build
projects: scripts/setversion.csproj
arguments: -c $(BuildConfiguration)
displayName: Set Version
condition: eq(variables['system.pullrequest.isfork'], false)

- task: DotNetCoreCLI@2
inputs:
Expand All @@ -28,9 +32,10 @@ steps:

- powershell: |
mkdir $(Build.ArtifactStagingDirectory)\Packages
ls .\NuSpecs\*.nuspec | %{ nuget pack $_.FullName -version "$(NBGV_NuGetPackageVersion)" -BasePath "src" -NoPackageAnalysis -OutputDirectory $(Build.ArtifactStagingDirectory)\Packages -Properties "RepositoryType=git;RepositoryCommit=$(NBGV_GitCommitId);RepositoryUrl=https://github.com/Humanizr/Humanizer"}
$version = .\nbgv get-version -f json | ConvertFrom-Json
ls .\NuSpecs\*.nuspec | %{ nuget pack $_.FullName -version "$($version.NuGetPackageVersion)" -BasePath "src" -NoPackageAnalysis -OutputDirectory $(Build.ArtifactStagingDirectory)\Packages -Properties "RepositoryType=git;RepositoryCommit=$($version.GitCommitId);RepositoryUrl=https://github.com/Humanizr/Humanizer"}
displayName: Create packages
condition: eq(variables['system.pullrequest.isfork'], false)
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))

- task: DotNetCoreCLI@2
inputs:
Expand All @@ -47,5 +52,5 @@ 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))

11 changes: 0 additions & 11 deletions scripts/setversion.csproj

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/version.json

This file was deleted.

0 comments on commit 47c250d

Please sign in to comment.