File tree Expand file tree Collapse file tree 2 files changed +8
-34
lines changed Expand file tree Collapse file tree 2 files changed +8
-34
lines changed Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT License.
33
4+ using Microsoft . PowerShell . PowerShellGet . UtilClasses ;
5+ using MoreLinq ;
6+ using MoreLinq . Extensions ;
7+ using NuGet . Commands ;
8+ using NuGet . Common ;
9+ using NuGet . Configuration ;
10+ using NuGet . Packaging ;
11+ using NuGet . Versioning ;
412using System ;
513using System . Collections ;
614using System . Collections . Generic ;
1018using System . Management . Automation . Language ;
1119using System . Net . Http ;
1220using System . Xml ;
13- using Microsoft . PowerShell . PowerShellGet . UtilClasses ;
14- using MoreLinq ;
15- using MoreLinq . Extensions ;
16- using NuGet . Commands ;
17- using NuGet . Common ;
18- using NuGet . Configuration ;
19- using NuGet . Packaging ;
20- using NuGet . Versioning ;
21-
2221
2322namespace Microsoft . PowerShell . PowerShellGet . Cmdlets
2423{
@@ -45,21 +44,6 @@ public sealed class PublishPSResource : PSCmdlet
4544 [ ArgumentCompleter ( typeof ( RepositoryNameCompleter ) ) ]
4645 public string Repository { get ; set ; }
4746
48- /// <summary>
49- /// Can be used to publish a nupkg locally.
50- /// </summary>
51- [ Parameter ( ) ]
52- [ ValidateNotNullOrEmpty ]
53- public string DestinationPath
54- {
55- get
56- { return _destinationPath ; }
57-
58- set
59- { _destinationPath = SessionState . Path . GetResolvedPSPathFromPSPath ( value ) . First ( ) . Path ; }
60- }
61- private string _destinationPath ;
62-
6347 /// <summary>
6448 /// Specifies the path to the resource that you want to publish. This parameter accepts the path to the folder that contains the resource.
6549 /// Specifies a path to one or more locations. Wildcards are permitted. The default location is the current directory (.).
Original file line number Diff line number Diff line change @@ -74,16 +74,6 @@ Describe "Test Publish-PSResource" {
7474 (Get-ChildItem $script :repositoryPath2 ).FullName | Should - Be $expectedPath
7575 }
7676
77- It " Publish a module with -Path and -DestinationPath" {
78- $version = " 1.0.0"
79- New-ModuleManifest - Path (Join-Path - Path $script :PublishModuleBase - ChildPath " $script :PublishModuleName .psd1" ) - ModuleVersion $version - Description " $script :PublishModuleName module"
80-
81- Publish-PSResource - Path $script :PublishModuleBase - DestinationPath $script :destinationPath
82-
83- $expectedPath = Join-Path - Path $script :repositoryPath - ChildPath " $script :PublishModuleName .$version .nupkg"
84- (Get-ChildItem $script :repositoryPath ).FullName | Should - Be $expectedPath
85- }
86-
8777 It " Publish a module with -LiteralPath" {
8878 $version = " 1.0.0"
8979 New-ModuleManifest - Path (Join-Path - Path $script :PublishModuleBase - ChildPath " $script :PublishModuleName .psd1" ) - ModuleVersion $version - Description " $script :PublishModuleName module"
You can’t perform that action at this time.
0 commit comments