File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,10 @@ Param(
18
18
[string ]$ModuleName ,
19
19
20
20
[Parameter ()]
21
- [string ]$GalleryName = " PSGallery"
21
+ [string ]$GalleryName = " PSGallery" ,
22
+
23
+ [Parameter ()]
24
+ [string ]$ArtifactsOutputPath = " $PSScriptRoot /../artifacts/Release/"
22
25
)
23
26
24
27
enum PSVersion
@@ -275,7 +278,20 @@ function Bump-AzVersion
275
278
$changeLog += " #### $updatedModule "
276
279
$changeLog += $ (Get-ReleaseNotes - Module $updatedModule - RootPath $rootPath ) + " `n "
277
280
}
278
-
281
+
282
+ $resolvedArtifactsOutputPath = (Resolve-Path $ArtifactsOutputPath ).Path
283
+ if (! (Test-Path $resolvedArtifactsOutputPath ))
284
+ {
285
+ throw " Please check artifacts output path: $resolvedArtifactsOutputPath whether exists."
286
+ }
287
+
288
+ # Update-ModuleManifest requires all required modules in Az.psd1 installed in local
289
+ # Add artifacts as PSModulePath to skip installation
290
+ if (! ($env: PSModulePath.Split (" ;" ).Contains($resolvedArtifactsOutputPath )))
291
+ {
292
+ $env: PSModulePath += " ;$resolvedArtifactsOutputPath "
293
+ }
294
+
279
295
Update-ModuleManifest - Path " $PSScriptRoot \Az\Az.psd1" - ModuleVersion $newVersion - ReleaseNotes $releaseNotes
280
296
Update-ChangeLog - Content $changeLog - RootPath $rootPath
281
297
return $versionBump
You can’t perform that action at this time.
0 commit comments