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(
1818 [string ]$ModuleName ,
1919
2020 [Parameter ()]
21- [string ]$GalleryName = " PSGallery"
21+ [string ]$GalleryName = " PSGallery" ,
22+
23+ [Parameter ()]
24+ [string ]$ArtifactsOutputPath = " $PSScriptRoot /../artifacts/Release/"
2225)
2326
2427enum PSVersion
@@ -275,7 +278,20 @@ function Bump-AzVersion
275278 $changeLog += " #### $updatedModule "
276279 $changeLog += $ (Get-ReleaseNotes - Module $updatedModule - RootPath $rootPath ) + " `n "
277280 }
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+
279295 Update-ModuleManifest - Path " $PSScriptRoot \Az\Az.psd1" - ModuleVersion $newVersion - ReleaseNotes $releaseNotes
280296 Update-ChangeLog - Content $changeLog - RootPath $rootPath
281297 return $versionBump
You can’t perform that action at this time.
0 commit comments