test injecting build number

This commit is contained in:
RaidMax 2020-01-15 13:32:01 -06:00
parent 68deaec081
commit 2ae8fd6e5b

View File

@ -1,11 +1,5 @@
# ASP.NET trigger:
# Build and test ASP.NET projects. batch: true
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger: none
pr:
branches: branches:
include: include:
- releases/* - releases/*
@ -15,6 +9,8 @@ pr:
- azure-pipelines.yml - azure-pipelines.yml
- Master/* - Master/*
pr: none
pool: pool:
vmImage: 'windows-latest' vmImage: 'windows-latest'
@ -47,6 +43,12 @@ steps:
platform: '$(buildPlatform)' platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)' configuration: '$(buildConfiguration)'
- task: oneLuckiDevJson2Variable@1
inputs:
jsonFile: '$(outputFolder)\VersionInformation.json'
shouldPrefixVariables: true
variablePrefix: 'VersionInformation'
- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
inputs: inputs:
command: 'publish' command: 'publish'
@ -54,7 +56,7 @@ steps:
projects: | projects: |
**/WebfrontCore.csproj **/WebfrontCore.csproj
**/Application.csproj **/Application.csproj
arguments: '-c $(buildConfiguration) -o $(outputFolder)' arguments: '-c $(buildConfiguration) -o $(outputFolder) /p:Version=$(VersionInformation.Major).$(VersionInformation.Minor).$(VersionInformation.Build).$(Build.BuildId)'
zipAfterPublish: false zipAfterPublish: false
modifyOutputPath: false modifyOutputPath: false
@ -72,12 +74,6 @@ steps:
failOnStderr: true failOnStderr: true
workingDirectory: '$(Build.Repository.LocalPath)' workingDirectory: '$(Build.Repository.LocalPath)'
- task: oneLuckiDevJson2Variable@1
inputs:
jsonFile: '$(outputFolder)\VersionInformation.json'
shouldPrefixVariables: true
variablePrefix: 'VersionInformation'
- task: BatchScript@1 - task: BatchScript@1
inputs: inputs:
filename: 'Application\BuildScripts\PostPublish.bat' filename: 'Application\BuildScripts\PostPublish.bat'
@ -138,21 +134,21 @@ steps:
preservePaths: false preservePaths: false
trustSSL: false trustSSL: false
- task: GitHubRelease@1 #- task: GitHubRelease@1
inputs: # inputs:
gitHubConnection: 'github.com_RaidMax' # gitHubConnection: 'github.com_RaidMax'
repositoryName: 'RaidMax/IW4M-Admin' # repositoryName: 'RaidMax/IW4M-Admin'
action: 'create' # action: 'create'
target: '$(Build.SourceVersion)' # target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag' # tagSource: 'userSpecifiedTag'
tag: '$(VersionInformation.Major).$(VersionInformation.Minor)-$(buildConfiguration)$(VersionInformation.Build)b$(Build.BuildId)' # tag: '$(VersionInformation.Major).$(VersionInformation.Minor)-$(buildConfiguration)$(VersionInformation.Build)b$(Build.BuildId)'
title: 'Version $(VersionInformation.Major).$(VersionInformation.Minor) $(buildConfiguration) Feature $(VersionInformation.Build) Build $(Build.BuildId)' # title: 'Version $(VersionInformation.Major).$(VersionInformation.Minor) $(buildConfiguration) Feature $(VersionInformation.Build) Build $(Build.BuildId)'
assets: '$(Build.ArtifactStagingDirectory)/*.zip' # assets: '$(Build.ArtifactStagingDirectory)/*.zip'
isPreRelease: true # isPreRelease: true
releaseNotesSource: 'inline' # releaseNotesSource: 'inline'
releaseNotesInline: 'todo' # releaseNotesInline: 'todo'
changeLogCompareToRelease: 'lastNonDraftRelease' # changeLogCompareToRelease: 'lastNonDraftRelease'
changeLogType: 'commitBased' # changeLogType: 'commitBased'
- task: PowerShell@2 - task: PowerShell@2
inputs: inputs: