Skip to content

Commit

Permalink
Improve packaging of Marketplace extension
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasvajk committed Dec 1, 2016
1 parent 8ca1d71 commit 6c90abe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
1 change: 0 additions & 1 deletion VSTS/Extensions/SonarQube/extension-manifest.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "sonarqube",
"name": "[Test] SonarQube",
"version": "set-by-pack.ps1",
"publisher": "amaurysonarsource",
"public": false,
"branding": {
"color": "#ff0000",
Expand Down
19 changes: 17 additions & 2 deletions VSTS/pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ param
[ValidateSet("Test", "Production")]
[string]$environment,
[Parameter(Mandatory=$true, HelpMessage="The three number version for this release")]
[string]$version
[string]$version,
[Parameter(Mandatory=$false, HelpMessage="Publisher name for 'Test' environment")]
[string]$publisherName
)

if ($environment -eq "Test" -and [string]::IsNullOrEmpty($publisherName))
{
Write-Error "No publisher name specified for the Test environment"
return
}

$ErrorActionPreference = "Stop"

$extensionsDirectoryPath = Join-Path $PSScriptRoot "Extensions"
Expand Down Expand Up @@ -201,7 +209,14 @@ function Pack
OverrideTaskLogos $extensionBuildTempPath $environment

Write-Host "Creating VSIX using tfx..."
& tfx extension create --root $extensionBuildTempPath --manifest-globs extension-manifest.json --overridesFile $overridesFile --outputPath "$buildArtifactsPath\$environment" --no-prompt
if ($environment -eq "Test")
{
& tfx extension create --root $extensionBuildTempPath --manifest-globs extension-manifest.json --overridesFile $overridesFile --outputPath "$buildArtifactsPath\$environment" --no-prompt --publisher $publisherName
}
else
{
& tfx extension create --root $extensionBuildTempPath --manifest-globs extension-manifest.json --overridesFile $overridesFile --outputPath "$buildArtifactsPath\$environment" --no-prompt
}
}

UpdateTfxCli
Expand Down

0 comments on commit 6c90abe

Please sign in to comment.