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
91c6cbc0f5
commit
ee56858949
1 changed files with 29 additions and 2 deletions
|
|
@ -9,8 +9,12 @@ trigger:
|
||||||
- src
|
- src
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- name: solutionFile
|
- name: ApplicationName
|
||||||
|
value: $(Build.DefinitionName)
|
||||||
|
- name: SolutionFile
|
||||||
value: 'src/Server-Managers.sln'
|
value: 'src/Server-Managers.sln'
|
||||||
|
- name: ProjectFile
|
||||||
|
value: 'src/$(ApplicationName)/$(ApplicationName).csproj'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: NuGetToolInstaller@1
|
- task: NuGetToolInstaller@1
|
||||||
|
|
@ -21,7 +25,7 @@ steps:
|
||||||
- task: NuGetCommand@2
|
- task: NuGetCommand@2
|
||||||
displayName: 'NuGet restore'
|
displayName: 'NuGet restore'
|
||||||
inputs:
|
inputs:
|
||||||
restoreSolution: '$(solutionFile)'
|
restoreSolution: '$(SolutionFile)'
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: 'Apply Semantic Versioning to Assemblies'
|
displayName: 'Apply Semantic Versioning to Assemblies'
|
||||||
|
|
@ -30,3 +34,26 @@ steps:
|
||||||
filePath: './.azure/scripts/ApplySemanticVersioningToAssemblies.ps1'
|
filePath: './.azure/scripts/ApplySemanticVersioningToAssemblies.ps1'
|
||||||
arguments: "-applicationName $(ApplicationName) -pathToSearch '$(Build.SourcesDirectory)/src' -buildNumber $(Build.BuildNumber) -searchFilter 'AssemblyInfo.*'"
|
arguments: "-applicationName $(ApplicationName) -pathToSearch '$(Build.SourcesDirectory)/src' -buildNumber $(Build.BuildNumber) -searchFilter 'AssemblyInfo.*'"
|
||||||
pwsh: true
|
pwsh: true
|
||||||
|
|
||||||
|
- task: projectfileprops@1
|
||||||
|
displayName: 'Modify ApplicationVersion In Project File'
|
||||||
|
inputs:
|
||||||
|
path: '$(ProjectFile)'
|
||||||
|
fieldOptions: ApplicationVersion
|
||||||
|
value: '$(VersionMajor).$(VersionMinor).$(VersionBuild).%2a'
|
||||||
|
|
||||||
|
- task: projectfileprops@1
|
||||||
|
displayName: 'Modify ApplicationRevision In Project File'
|
||||||
|
inputs:
|
||||||
|
path: '$(ProjectFile)'
|
||||||
|
fieldOptions: ApplicationRevision
|
||||||
|
value: '$(VersionRevision)'
|
||||||
|
|
||||||
|
- task: VSBuild@1
|
||||||
|
displayName: 'Build $(ApplicationName) Project'
|
||||||
|
inputs:
|
||||||
|
solution: '$(Parameters.project)'
|
||||||
|
msbuildArgs: '/t:publish /p:PublishDir="$(Agent.BuildDirectory)/a/"'
|
||||||
|
platform: '$(BuildPlatform)'
|
||||||
|
configuration: '$(BuildConfiguration)'
|
||||||
|
clean: true
|
||||||
Loading…
Add table
Add a link
Reference in a new issue