Skip to content

Commit 1863cf0

Browse files
authored
Temporarily remove unimplemented DestintationPath parameter (#431)
1 parent 02a85cc commit 1863cf0

File tree

2 files changed

+8
-34
lines changed

2 files changed

+8
-34
lines changed

src/code/PublishPSResource.cs

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
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;
412
using System;
513
using System.Collections;
614
using System.Collections.Generic;
@@ -10,15 +18,6 @@
1018
using System.Management.Automation.Language;
1119
using System.Net.Http;
1220
using 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

2322
namespace 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 (.).

test/PublishPSResource.Tests.ps1

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)