File tree Expand file tree Collapse file tree 5 files changed +26
-6
lines changed
Expand file tree Collapse file tree 5 files changed +26
-6
lines changed Original file line number Diff line number Diff line change 9090 # Bump the module version if we didn't already
9191 try {
9292 $GalleryVersion = Get-NextNugetPackageVersion - Name $env: BHProjectName - ErrorAction Stop
93- $GithubVersion = Get-MetaData - Path $env: BHPSModuleManifest - PropertyName ModuleVersion - ErrorAction Stop
93+ $GithubVersion = Get-Metadata - Path $env: BHPSModuleManifest - PropertyName ModuleVersion - ErrorAction Stop
9494 if ($GalleryVersion -ge $GithubVersion ) {
9595 Update-Metadata - Path $env: BHPSModuleManifest - PropertyName ModuleVersion - Value $GalleryVersion - ErrorAction stop
9696 }
@@ -104,4 +104,9 @@ Continuing with existing version.
104104
105105 # Build external help files from Platyps MD files
106106 New-ExternalHelp - Path " $ProjectRoot /docs/" - OutputPath " $ProjectRoot /PSKoans/en-us"
107+
108+ $BuiltModuleFolder = " $ProjectRoot /BuiltModule/"
109+ Write-Host " ##vso[task.setvariable variable=BuiltModuleFolder]$BuiltModuleFolder "
110+ New-Item - Path $BuiltModuleFolder - ItemType Directory
111+ Copy-Item - Path " $ProjectRoot /PSKoans" - Destination $BuiltModuleFolder - Recurse - PassThru
107112}
Original file line number Diff line number Diff line change 11Deploy Module {
22 By PSGalleryModule {
3- FromSource PSKoans
3+ FromSource " $PSScriptRoot / PSKoans"
44 To FileSystem
55 WithOptions @ {
6- ApiKey = $ ENV: NugetApiKey
6+ ApiKey = ' FileSystem '
77 }
88 }
99}
Original file line number Diff line number Diff line change 11Deploy Module {
22 By PSGalleryModule {
3- FromSource PSKoans
3+ FromSource " $PSScriptRoot / PSKoans"
44 To PSGallery
55 WithOptions @ {
66 ApiKey = $ENV: NugetApiKey
Original file line number Diff line number Diff line change 1010 $OutputDirectory
1111)
1212
13- $ENV : NugetApiKey = $Key
13+ $env : NugetApiKey = $Key
1414
1515if ($OutputDirectory ) {
1616 $Params = @ {
@@ -33,6 +33,21 @@ if ($OutputDirectory) {
3333 }
3434}
3535
36+ $HelpFile = Get-ChildItem - Path $Path - File - Recurse - Filter ' *-help.xml'
37+
38+ if ($HelpFile.Directory -notmatch ' en-us|\w{1,2}-\w{1,2}' ) {
39+ $PSCmdlet.WriteError (
40+ [System.Management.Automation.ErrorRecord ]::new(
41+ [IO.FileNotFoundException ]::new(" Help files are missing!" ),
42+ ' Build.HelpXmlMissing' ,
43+ ' ObjectNotFound' ,
44+ $null
45+ )
46+ )
47+
48+ exit 404
49+ }
50+
3651$DeploymentParams = @ {
3752 Path = $Path
3853 Recurse = $false
Original file line number Diff line number Diff line change 2626 - task : PublishPipelineArtifact@1
2727 displayName : ' Publish Built Module Artifact'
2828 inputs :
29- path : ' $(System.DefaultWorkingDirectory )/PSKoans'
29+ path : ' $(BuiltModuleFolder )/PSKoans'
3030 artifact : PSKoans
3131
3232- job : Windows
You can’t perform that action at this time.
0 commit comments