mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
add psmodulerestore in travis.ps1
This commit is contained in:
1 parent
bfe59b3495
commit
9b27d4a23a
2 files changed
+9
-4
No files matched your search
+8
-3
@@ -2561,7 +2561,7 @@ function Restore-PSModule
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$Destination,
|
||||
|
||||
[string]$SourceLocation="https://powershell.myget.org/F/powershellmodule/api/v2",
|
||||
[string]$SourceLocation="https://powershell.myget.org/F/powershellmodule/api/v2/",
|
||||
|
||||
[string]$RequiredVersion
|
||||
)
|
||||
@@ -2571,6 +2571,7 @@ function Restore-PSModule
|
||||
|
||||
# Check if the PackageManagement works in the base-oS or PowerShellCore
|
||||
Get-PackageProvider -Name NuGet -ForceBootstrap -Verbose:$VerbosePreference
|
||||
Get-PackageProvider -Name PowerShellGet -Verbose:$VerbosePreference
|
||||
|
||||
# Get the existing registered PowerShellGet repositories
|
||||
$psrepos = PowerShellGet\Get-PSRepository
|
||||
@@ -2628,8 +2629,12 @@ function Restore-PSModule
|
||||
# Clean up
|
||||
if($needRegister)
|
||||
{
|
||||
log "Unregistering PSRepository with name: $RepositoryName"
|
||||
PowerShellGet\Get-PSRepository -Name $RepositoryName -ErrorAction SilentlyContinue | PowerShellGet\UnRegister-PSRepository -Name $RepositoryName
|
||||
$regVar = PowerShellGet\Get-PSRepository -Name $RepositoryName -ErrorAction SilentlyContinue
|
||||
if($regVar)
|
||||
{
|
||||
log "Unregistering PSRepository with name: $RepositoryName"
|
||||
PowerShellGet\UnRegister-PSRepository -Name $RepositoryName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ $isCron = $env:TRAVIS_EVENT_TYPE -eq 'cron'
|
||||
|
||||
Start-PSBootstrap -Package:(-not $isPr)
|
||||
$output = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Publish))
|
||||
Start-PSBuild -CrossGen
|
||||
Start-PSBuild -CrossGen -PSModuleRestore
|
||||
|
||||
$pesterParam = @{ 'binDir' = $output }
|
||||
|
||||
|
||||
Reference in new issue
Block a user