@@ -73,23 +73,23 @@ steps:
73
73
inputs :
74
74
versionSpec : ' >= 2.4'
75
75
addToPath : true
76
- condition : and( succeeded(), ne( variables['Build.Reason '], 'PullRequest' ) )
76
+ condition : and( succeeded(), not( contains( variables['Build.SourceBranchName '], 'pull') ) )
77
77
displayName : Setup Ruby
78
78
79
79
# generate change log including future version
80
80
- powershell : |
81
81
gem install github_changelog_generator --quiet --no-ri --no-rdoc
82
82
# need to call it passing both cache options with full path otherwise it won't work
83
83
github_changelog_generator --token $(GitHubToken) --cache-log $env:AGENT_TEMPDIRECTORY\github-changelog-logger.log --cache-file $env:AGENT_TEMPDIRECTORY\github-changelog-http-cache
84
- condition : and( succeeded(), ne( variables['Build.Reason '], 'PullRequest' ), not( contains(variables['Build.SourceBranchName'], 'tags') ), or( eq(variables['Build.SourceBranchName'], 'master'), contains(variables['Build.SourceBranchName'], 'release') ) )
84
+ condition : and( succeeded(), not( contains( variables['Build.SourceBranchName '], 'pull') ), not( contains(variables['Build.SourceBranchName'], 'tags') ), or( eq(variables['Build.SourceBranchName'], 'master'), contains(variables['Build.SourceBranchName'], 'release') ) )
85
85
displayName : Generate change log
86
86
87
87
# generate change log including future version
88
88
- powershell : |
89
89
gem install github_changelog_generator --quiet --no-ri --no-rdoc
90
90
# need to call it passing both cache options with full path otherwise it won't work
91
91
github_changelog_generator --token $(GitHubToken) --cache-log $env:AGENT_TEMPDIRECTORY\github-changelog-logger.log --cache-file $env:AGENT_TEMPDIRECTORY\github-changelog-http-cache --future-release v$env:MY_NUGET_VERSION
92
- condition : and( succeeded(), ne( variables['Build.Reason '], 'PullRequest' ), not( contains(variables['Build.SourceBranchName'], 'tags') ), not( or( eq(variables['Build.SourceBranchName'], 'master'), contains(variables['Build.SourceBranchName'], 'release') ) ) )
92
+ condition : and( succeeded(), not( contains( variables['Build.SourceBranchName '], 'pull') ), not( contains(variables['Build.SourceBranchName'], 'tags') ), not( or( eq(variables['Build.SourceBranchName'], 'master'), contains(variables['Build.SourceBranchName'], 'release') ) ) )
93
93
displayName : Generate change log
94
94
95
95
# copy change log to artifacts directory
98
98
SourceFolder : ' $(System.DefaultWorkingDirectory)'
99
99
Contents : ' CHANGELOG.md'
100
100
TargetFolder : ' $(Build.ArtifactStagingDirectory)'
101
- condition : and( succeeded(), ne( variables['Build.Reason '], 'PullRequest' ) )
101
+ condition : and( succeeded(), not( contains( variables['Build.SourceBranchName '], 'pull') ) )
102
102
displayName : Copy Changelog
103
103
104
104
# push new changelog to GitHub repo
@@ -108,7 +108,7 @@ steps:
108
108
# need to wrap the git command bellow so it doesn't throw an error because of redirecting the output to stderr
109
109
git push origin "HEAD:$(Build.SourceBranchName)" --porcelain
110
110
workingDirectory : $(System.DefaultWorkingDirectory)
111
- condition : and( succeeded(), ne( variables['Build.Reason '], 'PullRequest' ), not( contains(variables['Build.SourceBranchName'], 'tags') ) )
111
+ condition : and( succeeded(), not( contains( variables['Build.SourceBranchName '], 'pull') ), not( contains(variables['Build.SourceBranchName'], 'tags') ) )
112
112
displayName : Push changelog to GitHub
113
113
114
114
# update could build number (only possible if this is not a PR from a fork)
@@ -168,7 +168,7 @@ steps:
168
168
nuGetFeedType : external
169
169
packagesToPush : ' $(Build.ArtifactStagingDirectory)/$(nugetPackageName).nupkg;!$(Build.ArtifactStagingDirectory)/$(nugetPackageName).symbols.nupkg'
170
170
publishFeedCredentials : ' NuGet'
171
- condition : and( succeeded(), ne( variables['Build.Reason '], 'PullRequest' ), contains(variables['Build.SourceBranchName'], 'tags') )
171
+ condition : and( succeeded(), not( contains( variables['Build.SourceBranchName '], 'pull') ), contains(variables['Build.SourceBranchName'], 'tags') )
172
172
displayName : Push NuGet packages to NuGet
173
173
174
174
# step from template @ nf-tools repo
0 commit comments