Skip to content

Commit f8113e4

Browse files
authored
pre: Remove release notes for now (#7)
* Remove release notes for now * Add some status messages * Don't try to publish when build is triggered by a PR * Remove release notes for now
1 parent 14e7a42 commit f8113e4

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

Module.BuildSettings.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ $CodeCoverageFiles = "$SrcRootDir\*.ps1", "$SrcRootDir\*.psm1"
119119
# you will be prompted to enter your API key. The build will store the key encrypted in the
120120
# settings file, so that on subsequent publishes you will no longer be prompted for the API key.
121121
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
122-
$NuGetApiKey = $env:PowerShellGalleryKey
122+
$NuGetApiKey = $env:PowershellGalleryKey
123123

124124
# Name of the repository you wish to publish to. If $null is specified the default repo (PowerShellGallery) is used.
125125
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
@@ -128,7 +128,7 @@ $PublishRepository = "PSGallery"
128128
# Path to the release notes file. Set to $null if the release notes reside in the manifest file.
129129
# The contents of this file are used during publishing for the ReleaseNotes parameter.
130130
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
131-
$ReleaseNotesPath = "$PSScriptRoot\ReleaseNotes.md"
131+
$ReleaseNotesPath = $null
132132

133133
# ----------------------- Misc properties ---------------------------------
134134

@@ -171,11 +171,15 @@ Task AfterStageFiles -After StageFiles {
171171
# Update prerelase string
172172
if($env:APPVEYOR_REPO_COMMIT_MESSAGE -like "pre: *") {
173173
$Manifest = $Manifest -Replace 'Prerelease = \$null', 'Prerelease = "pre"'
174+
} else {
175+
"AppVeyor pre-release not detected"
174176
}
175177

176178
# Update module version
177179
if($env:APPVEYOR_BUILD_VERSION) {
178180
$Manifest = $Manifest -Replace "ModuleVersion ?= ?['`"](\d+\.?){2,4}['`"]", "ModuleVersion = '$env:APPVEYOR_BUILD_VERSION'"
181+
} else {
182+
"AppVeyor build version not detected"
179183
}
180184

181185
# Write updated manifest
@@ -275,5 +279,7 @@ Task AfterTest -After Test {
275279
if($env:APPVEYOR_JOB_ID -and (Test-Path $TestOutputFile)) {
276280
$wc = New-Object System.Net.WebClient
277281
$wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $TestOutputFile))
282+
} else {
283+
"Skipping upload test results"
278284
}
279285
}

appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ install:
2222
install-module PSScriptAnalyzer -force -AllowClobber -SkipPublisherCheck
2323
build_script:
2424
- ps: |
25-
if($env:APPVEYOR_REPO_BRANCH -eq "master") {
26-
.\Invoke-Build.ps1 publish
27-
} else {
25+
if($env:APPVEYOR_REPO_BRANCH -ne "master" -or $env:APPVEYOR_PULL_REQUEST_NUMBER) {
2826
.\Invoke-Build.ps1 build,test
27+
} else {
28+
.\Invoke-Build.ps1 publish
2929
}
3030
3131
artifacts:

0 commit comments

Comments
 (0)