From 7bbbed8dfb20349876d93418b59f5a2b53c90402 Mon Sep 17 00:00:00 2001 From: JosephMcEvoy Date: Wed, 13 Jan 2021 15:54:53 -0500 Subject: [PATCH 1/4] Add SkipAutomaticTags to PSGalleryModule. Add SkipAutomaticTags option to PSGalleryModule.ps1. --- PSDeploy/PSDeployScripts/PSGalleryModule.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PSDeploy/PSDeployScripts/PSGalleryModule.ps1 b/PSDeploy/PSDeployScripts/PSGalleryModule.ps1 index a618b60..2283c51 100644 --- a/PSDeploy/PSDeployScripts/PSGalleryModule.ps1 +++ b/PSDeploy/PSDeployScripts/PSGalleryModule.ps1 @@ -8,6 +8,9 @@ .PARAMETER Deployment Deployment to run + + .PARAMETER SkipAutomaticTags + Removes commands and resources from being included as tags. Skips automatically adding tags to a module. .PARAMETER ApiKey API Key used to authenticate to PowerShell repository. @@ -49,12 +52,16 @@ foreach($deploy in $Deployment) { Repository = $target Verbose = $VerbosePreference } + if ($SkipAutomaticTags) { + $params['SkipAutomaticTags'] = $deploy.DeploymentOptions.SkipAutomaticTags + } if ($ApiKey) { $params['NuGetApiKey'] = $deploy.DeploymentOptions.ApiKey } if ($Credential) { $params['Credential'] = $deploy.DeploymentOptions.Credential } + Publish-Module @params } From d8d6b522e340a93bd670bcf319bee362b76309b2 Mon Sep 17 00:00:00 2001 From: JosephMcEvoy Date: Wed, 13 Jan 2021 15:58:43 -0500 Subject: [PATCH 2/4] Update PSGalleryModule.ps1 --- PSDeploy/PSDeployScripts/PSGalleryModule.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/PSDeploy/PSDeployScripts/PSGalleryModule.ps1 b/PSDeploy/PSDeployScripts/PSGalleryModule.ps1 index 2283c51..c1a235a 100644 --- a/PSDeploy/PSDeployScripts/PSGalleryModule.ps1 +++ b/PSDeploy/PSDeployScripts/PSGalleryModule.ps1 @@ -61,7 +61,6 @@ foreach($deploy in $Deployment) { if ($Credential) { $params['Credential'] = $deploy.DeploymentOptions.Credential } - Publish-Module @params } From d49538d25ee0f77686eb7911e4e5cf81cb11b32e Mon Sep 17 00:00:00 2001 From: JosephMcEvoy Date: Wed, 13 Jan 2021 16:57:59 -0500 Subject: [PATCH 3/4] Added SkipAutomaticTags = $false. --- Tests/artifacts/DeploymentsPSGalleryModule.psdeploy.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/artifacts/DeploymentsPSGalleryModule.psdeploy.ps1 b/Tests/artifacts/DeploymentsPSGalleryModule.psdeploy.ps1 index 7e732d8..d0a162b 100644 --- a/Tests/artifacts/DeploymentsPSGalleryModule.psdeploy.ps1 +++ b/Tests/artifacts/DeploymentsPSGalleryModule.psdeploy.ps1 @@ -5,6 +5,7 @@ Deploy TestModule { Tagged Testing WithOptions @{ ApiKey = '0c3e374b-49a3-4b05-a597-fd45773a4fb6' + SkipAutomaticTags = $false } } -} \ No newline at end of file +} From a5e543475d2d94fb4645533db30810bd28526232 Mon Sep 17 00:00:00 2001 From: JosephMcEvoy Date: Wed, 13 Jan 2021 17:00:53 -0500 Subject: [PATCH 4/4] Set SkipAutomaticTags to true. --- Tests/artifacts/DeploymentsPSGalleryModule.psdeploy.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/artifacts/DeploymentsPSGalleryModule.psdeploy.ps1 b/Tests/artifacts/DeploymentsPSGalleryModule.psdeploy.ps1 index d0a162b..fc74dd9 100644 --- a/Tests/artifacts/DeploymentsPSGalleryModule.psdeploy.ps1 +++ b/Tests/artifacts/DeploymentsPSGalleryModule.psdeploy.ps1 @@ -5,7 +5,7 @@ Deploy TestModule { Tagged Testing WithOptions @{ ApiKey = '0c3e374b-49a3-4b05-a597-fd45773a4fb6' - SkipAutomaticTags = $false + SkipAutomaticTags = $true } } }