Skip to content

Commit

Permalink
Update psci.psm1 (#21276)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyunchi-ms authored Mar 22, 2023
1 parent 3040e77 commit d7155ed
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tools/SwaggerCI/psci.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function Invoke-SwaggerCI {

# region Phase 1
foreach ($rd in $config.relatedReadmeMdFiles) {
$moduleName = $rd.split("/")[1]
$moduleName = $rd.split("/")[1] + ".DefaultTag"
# Set moduleName to modulePath at first
$rdFolder = Join-Path $config.specFolder (Split-Path $rd -Parent)
$rdPath = Join-Path $rdFolder "readme.md"
Expand Down Expand Up @@ -92,16 +92,19 @@ function Build-Module {
#Package
$Null = . (Join-Path $moduleFolder "pack-module.ps1")

$moduleName = (Get-ChildItem -Path $moduleFolder -Recurse -Filter "*.nupkg").Name.Split('.')[1]
$package = Get-ChildItem -Path $moduleFolder -Recurse -Filter "*.nupkg"
$packageName = $package.Name
$packagePath = Split-Path $package.FullName -Parent
$packageFolder = [System.IO.Path]::GetRelativePath((Get-Location), $packagePath)

#Generate result
$downloadUrl = $config.installInstructionInput.downloadUrlPrefix + "Az.$moduleName/Az.$moduleName.0.1.0.nupkg"
$downloadCmd = "curl -L $downloadUrl -o Az.$moduleName.0.1.0.nupkg"
$downloadUrl = $config.installInstructionInput.downloadUrlPrefix + "Az.$moduleName/$packageName"
$downloadCmd = "curl -L $downloadUrl -o $packageName"
$package = @{
packageName = "Az.$moduleName"
path = @("swaggerci/$moduleName")
path = @([System.IO.Path]::GetRelativePath((Get-Location), $moduleFolder))
readmeMd = @($rd)
artifacts = @("swaggerci/$moduleName/bin/Az.$moduleName.0.1.0.nupkg")
artifacts = @("$packageFolder/$packageName")
installInstructions = @{full = "Please download the package through the curl command '$downloadCmd', and then you could have a try locally."}
result = "succeeded"
}
Expand Down

0 comments on commit d7155ed

Please sign in to comment.