mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
parent
de572ae94e
commit
9ec961ad2d
1 changed files with 62 additions and 55 deletions
|
|
@ -22,65 +22,72 @@ variables:
|
||||||
- name: PublishFolder
|
- name: PublishFolder
|
||||||
value: publish
|
value: publish
|
||||||
|
|
||||||
steps:
|
stages:
|
||||||
- task: NuGetToolInstaller@1
|
- stage: build
|
||||||
displayName: 'Install NuGet 4.4.1'
|
displayName: Build and Publish
|
||||||
inputs:
|
|
||||||
versionSpec: '4.4.1'
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
jobs:
|
||||||
displayName: 'NuGet restore'
|
- job: build
|
||||||
inputs:
|
displayName: Build and Publish
|
||||||
restoreSolution: '$(SolutionFile)'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
steps:
|
||||||
displayName: 'Apply Semantic Versioning to Assemblies'
|
- task: NuGetToolInstaller@1
|
||||||
inputs:
|
displayName: 'Install NuGet 4.4.1'
|
||||||
targetType: filePath
|
inputs:
|
||||||
filePath: './.azure/scripts/ApplySemanticVersioningToAssemblies.ps1'
|
versionSpec: '4.4.1'
|
||||||
arguments: "-applicationName $(ApplicationName) -pathToSearch '$(Build.SourcesDirectory)/src' -buildNumber $(Build.BuildNumber) -searchFilter 'AssemblyInfo.*'"
|
|
||||||
pwsh: true
|
|
||||||
|
|
||||||
- task: projectfileprops@1
|
- task: NuGetCommand@2
|
||||||
displayName: 'Modify ApplicationVersion In Project File'
|
displayName: 'NuGet restore'
|
||||||
inputs:
|
inputs:
|
||||||
path: '$(ProjectFile)'
|
restoreSolution: '$(SolutionFile)'
|
||||||
fieldOptions: ApplicationVersion
|
|
||||||
value: '$(VersionMajor).$(VersionMinor).$(VersionBuild).%2a'
|
|
||||||
|
|
||||||
- task: projectfileprops@1
|
- task: PowerShell@2
|
||||||
displayName: 'Modify ApplicationRevision In Project File'
|
displayName: 'Apply Semantic Versioning to Assemblies'
|
||||||
inputs:
|
inputs:
|
||||||
path: '$(ProjectFile)'
|
targetType: filePath
|
||||||
fieldOptions: ApplicationRevision
|
filePath: './.azure/scripts/ApplySemanticVersioningToAssemblies.ps1'
|
||||||
value: '$(VersionRevision)'
|
arguments: "-applicationName $(ApplicationName) -pathToSearch '$(Build.SourcesDirectory)/src' -buildNumber $(Build.BuildNumber) -searchFilter 'AssemblyInfo.*'"
|
||||||
|
pwsh: true
|
||||||
|
|
||||||
- task: VSBuild@1
|
- task: projectfileprops@1
|
||||||
displayName: 'Build $(ApplicationName) Project'
|
displayName: 'Modify ApplicationVersion In Project File'
|
||||||
inputs:
|
inputs:
|
||||||
solution: '$(ProjectFile)'
|
path: '$(ProjectFile)'
|
||||||
msbuildArgs: '/t:publish /p:PublishDir="$(Build.ArtifactStagingDirectory)/bin"'
|
fieldOptions: ApplicationVersion
|
||||||
platform: '$(BuildPlatform)'
|
value: '$(VersionMajor).$(VersionMinor).$(VersionBuild).%2a'
|
||||||
configuration: '$(BuildConfiguration)'
|
|
||||||
clean: true
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
- task: projectfileprops@1
|
||||||
displayName: 'Copy Artifact Files'
|
displayName: 'Modify ApplicationRevision In Project File'
|
||||||
inputs:
|
inputs:
|
||||||
SourceFolder: '$(Build.SourcesDirectory)'
|
path: '$(ProjectFile)'
|
||||||
Contents: |
|
fieldOptions: ApplicationRevision
|
||||||
src/$(ApplicationName)/VersionFeed.xml
|
value: '$(VersionRevision)'
|
||||||
src/$(ApplicationName)/VersionFeedBeta.xml
|
|
||||||
src/$(ApplicationName)/Art\favicon.ico
|
|
||||||
src/$(ApplicationName)/Globalization\en-US\en-US.xaml
|
|
||||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
||||||
OverWrite: true
|
|
||||||
flattenFolders: true
|
|
||||||
preserveTimestamp: true
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: VSBuild@1
|
||||||
displayName: 'Publish Artifacts'
|
displayName: 'Build $(ApplicationName) Project'
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
solution: '$(ProjectFile)'
|
||||||
ArtifactName: '$(PublishFolder)'
|
msbuildArgs: '/t:publish /p:PublishDir="$(Build.ArtifactStagingDirectory)/bin"'
|
||||||
condition: succeededOrFailed()
|
platform: '$(BuildPlatform)'
|
||||||
|
configuration: '$(BuildConfiguration)'
|
||||||
|
clean: true
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Copy Artifact Files'
|
||||||
|
inputs:
|
||||||
|
SourceFolder: '$(Build.SourcesDirectory)'
|
||||||
|
Contents: |
|
||||||
|
src/$(ApplicationName)/VersionFeed.xml
|
||||||
|
src/$(ApplicationName)/VersionFeedBeta.xml
|
||||||
|
src/$(ApplicationName)/Art\favicon.ico
|
||||||
|
src/$(ApplicationName)/Globalization\en-US\en-US.xaml
|
||||||
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
OverWrite: true
|
||||||
|
flattenFolders: true
|
||||||
|
preserveTimestamp: true
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: 'Publish Artifacts'
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
ArtifactName: '$(PublishFolder)'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue