@@ -101,7 +101,7 @@ function Make-StrictModuleDependencies
101
101
102
102
if ($newModules.Count -gt 0 )
103
103
{
104
- Update-ModuleManifest - Path $Path - RequiredModules $newModules - LicenseUri " http://aka.ms/azps-license "
104
+ Update-ModuleManifest - Path $Path - RequiredModules $newModules
105
105
}
106
106
107
107
}
@@ -190,8 +190,7 @@ function Change-RMModule
190
190
$moduleSourcePath = Join-Path - Path $Path - ChildPath $moduleManifest
191
191
$manifest = Make- StrictModuleDependencies $moduleSourcePath
192
192
$manifest = Test-ModuleManifest - Path $moduleSourcePath
193
- $toss = Publish-Module - Path $Path - Repository $TempRepo - LicenseUri " http://aka.ms/azps-license"
194
- # '$nugetExe pack'
193
+ $toss = Publish-Module - Path $Path - Repository $TempRepo
195
194
Write-Output " Changing to directory for module modifications $TempRepoPath "
196
195
pushd $TempRepoPath
197
196
try
@@ -264,13 +263,13 @@ if ([string]::IsNullOrEmpty($buildConfig))
264
263
265
264
if ([string ]::IsNullOrEmpty($repositoryLocation ))
266
265
{
267
- Write-Verbose " No repository location was provided, setting it to default"
268
- Write-Verbose " Setting repository location to 'https://dtlgalleryint.cloudapp.net/api/v2'"
266
+ Write-Output " No repository location was provided, setting it to default"
267
+ Write-Output " Setting repository location to 'https://dtlgalleryint.cloudapp.net/api/v2'"
269
268
$repositoryLocation = " https://dtlgalleryint.cloudapp.net/api/v2"
270
269
}
271
270
else
272
271
{
273
- Write-Verbose " Setting repository location to '$repositoryLocation '"
272
+ Write-Output " Setting repository location to '$repositoryLocation '"
274
273
}
275
274
276
275
if ([string ]::IsNullOrEmpty($scope ))
@@ -293,25 +292,25 @@ $repo = Get-PSRepository | where { $_.SourceLocation -eq $repositoryLocation }
293
292
if ($repo -ne $null )
294
293
{
295
294
$repoName = $repo.Name
296
- Write-Verbose " Existing PS Repository detected: $repo .Name"
295
+ Write-Output " Existing PS Repository detected: $repo .Name"
297
296
}
298
297
else
299
298
{
300
299
$repoName = $ (New-Guid ).ToString()
301
- Write-Verbose " Setting up new PS Repository to: -Name $repoName -SourceLocation $repositoryLocation -PublishLocation $repositoryLocation /package -InstallationPolicy Trusted"
300
+ Write-Output " Setting up new PS Repository to: -Name $repoName -SourceLocation $repositoryLocation -PublishLocation $repositoryLocation /package -InstallationPolicy Trusted"
302
301
Register-PSRepository - Name $repoName - SourceLocation $repositoryLocation - PublishLocation $repositoryLocation \package - InstallationPolicy Trusted
303
302
}
304
303
305
304
$publishToLocal = test-path $repositoryLocation
306
305
[string ]$tempRepoPath = " $PSScriptRoot \..\src\package"
307
306
if ($publishToLocal )
308
307
{
309
- Write-Verbose " Publish to local is set to: $publishToLocal "
308
+ Write-Output " Publish to local is set to: $publishToLocal "
310
309
$tempRepoPath = (Join-Path $repositoryLocation - ChildPath " package" )
311
310
}
312
311
313
312
$tempRepoName = ([System.Guid ]::NewGuid()).ToString()
314
- Write-Verbose " Setting up TEMP PS Repository to: -Name $tempRepoName -SourceLocation $tempRepoPath -PublishLocation $tempRepoPath -InstallationPolicy Trusted -PackageManagementProvider NuGet"
313
+ Write-Output " Setting up TEMP PS Repository to: -Name $tempRepoName -SourceLocation $tempRepoPath -PublishLocation $tempRepoPath -InstallationPolicy Trusted -PackageManagementProvider NuGet"
315
314
Register-PSRepository - Name $tempRepoName - SourceLocation $tempRepoPath - PublishLocation $tempRepoPath - InstallationPolicy Trusted - PackageManagementProvider NuGet
316
315
317
316
try {
@@ -340,6 +339,16 @@ try {
340
339
}
341
340
finally
342
341
{
343
- Unregister-PSRepository - Name $tempRepoName
344
- Unregister-PSRepository - Name $repoName
342
+ if ($tempRepoName -ne $null )
343
+ {
344
+ Write-Output " Unregistering Repository: $tempRepoName "
345
+ Get-PSRepository - Name $tempRepoName | Unregister-PSRepository
346
+ }
347
+
348
+ if ($repoName -ne $null )
349
+ {
350
+ Write-Output " Unregistering Repository: $repoName "
351
+ Get-PSRepository - Name $repoName | Unregister-PSRepository
352
+ }
353
+
345
354
}
0 commit comments