Skip to content

Commit

Permalink
test version script
Browse files Browse the repository at this point in the history
  • Loading branch information
fszlin committed May 31, 2021
1 parent d7440b8 commit fbe7f44
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 34 deletions.
20 changes: 1 addition & 19 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ stages:
appFramework: net5.0
pool:
vmImage: 'ubuntu-latest'
assemblyVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemVer'] ]
fileVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemFileVer'] ]
informationalVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.InformationalVersion'] ]

- template: scripts/build.yml
parameters:
Expand All @@ -49,9 +46,6 @@ stages:
appFramework: net5.0
pool:
vmImage: 'macOS-latest'
assemblyVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemVer'] ]
fileVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemFileVer'] ]
informationalVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.InformationalVersion'] ]

- template: scripts/build.yml
parameters:
Expand All @@ -61,9 +55,6 @@ stages:
appFramework: net5.0
pool:
vmImage: 'windows-latest'
assemblyVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemVer'] ]
fileVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemFileVer'] ]
informationalVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.InformationalVersion'] ]

- template: scripts/build.yml
parameters:
Expand All @@ -73,14 +64,11 @@ stages:
appFramework: net452
pool:
vmImage: 'windows-latest'
assemblyVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemVer'] ]
fileVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemFileVer'] ]
informationalVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.InformationalVersion'] ]

- stage: pack
displayName: Pack
dependsOn:
- var
- ver
- test
jobs:

Expand All @@ -89,15 +77,9 @@ stages:
name: 'pack'
displayName: 'Pack Certes'
projectName: 'Certes'
assemblyVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemVer'] ]
fileVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemFileVer'] ]
informationalVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.InformationalVersion'] ]

- template: scripts/pack.yml
parameters:
name: 'pack_tool'
displayName: 'Pack Certes.Tool'
projectName: 'Certes.Cli'
assemblyVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemVer'] ]
fileVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemFileVer'] ]
informationalVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.InformationalVersion'] ]
19 changes: 10 additions & 9 deletions scripts/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ parameters:
pool: ''
framework: ''
appFramework: ''
assemblyVersion: ''
fileVersion: ''
informationalVersion: ''

jobs:
- job: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
variables:
assemblyVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemVer'] ]
fileVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemFileVer'] ]
informationalVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.InformationalVersion'] ]
pool: ${{ parameters.pool }}

steps:
Expand Down Expand Up @@ -42,9 +43,9 @@ jobs:
projects: 'test/Certes.Tests/Certes.Tests.csproj'
arguments: '-f ${{ parameters.appFramework }} -p:SkipSigning=true'
env:
CERTES_ASSEMBLY_VERSION: ${{ parameters.assemblyVersion }}
CERTES_FILE_VERSION: ${{ parameters.fileVersion }}
CERTES_INFORMATIONAL_ASSEMBLYVERSION: ${{ parameters.informationalVersion }}
CERTES_ASSEMBLY_VERSION: $(assemblyVersion)
CERTES_FILE_VERSION: $(fileVersion)
CERTES_INFORMATIONAL_ASSEMBLYVERSION: $(informationalVersion)

- task: DotNetCoreCLI@2
displayName: 'Run unit tests'
Expand All @@ -69,9 +70,9 @@ jobs:
projects: 'test/Certes.Tests.Integration/Certes.Tests.Integration.csproj'
arguments: '-f ${{ parameters.appFramework }} -p:SkipSigning=true'
env:
CERTES_ASSEMBLY_VERSION: ${{ parameters.assemblyVersion }}
CERTES_FILE_VERSION: ${{ parameters.fileVersion }}
CERTES_INFORMATIONAL_ASSEMBLYVERSION: ${{ parameters.informationalVersion }}
CERTES_ASSEMBLY_VERSION: $(assemblyVersion)
CERTES_FILE_VERSION: $(fileVersion)
CERTES_INFORMATIONAL_ASSEMBLYVERSION: $(informationalVersion)

- task: DotNetCoreCLI@2
displayName: 'Run integration tests'
Expand Down
13 changes: 7 additions & 6 deletions scripts/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ parameters:
name: ''
displayName: ''
projectName: ''
assemblyVersion: ''
fileVersion: ''
informationalVersion: ''

jobs:
- job: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
variables:
assemblyVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemVer'] ]
fileVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.AssemblySemFileVer'] ]
informationalVersion: $[ stageDependencies.ver.ver.outputs['version.GitVersion.InformationalVersion'] ]
pool:
vmImage: 'windows-latest'

Expand All @@ -22,9 +23,9 @@ jobs:
custom: 'pack'
arguments: 'src/${{ parameters.projectName }}/${{ parameters.projectName }}.csproj --include-symbols -c Release'
env:
CERTES_ASSEMBLY_VERSION: ${{ parameters.assemblyVersion }}
CERTES_FILE_VERSION: ${{ parameters.fileVersion }}
CERTES_INFORMATIONAL_ASSEMBLYVERSION: ${{ parameters.informationalVersion }}
CERTES_ASSEMBLY_VERSION: $(assemblyVersion)
CERTES_FILE_VERSION: $(fileVersion)
CERTES_INFORMATIONAL_ASSEMBLYVERSION: $(informationalVersion)

- task: CopyFiles@2
displayName: Copy nupkg
Expand Down

0 comments on commit fbe7f44

Please sign in to comment.