Skip to content

Commit 5b30b8d

Browse files
committed
(build) fix publish for vsix
1 parent aac1720 commit 5b30b8d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

build/publish.cake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,12 @@ Task("Publish-Vsix")
136136

137137
NpmSet(new NpmSetSettings { WorkingDirectory = workDir, LogLevel = NpmLogLevel.Silent, Key = "progress", Value = "false" });
138138
NpmInstall(new NpmInstallSettings { WorkingDirectory = workDir, LogLevel = NpmLogLevel.Silent });
139-
TfxExtensionPublish(parameters.Paths.Files.VsixOutputFilePath, settings);
139+
140+
var vsixFilePath = parameters.Paths.Files.VsixOutputFilePath;
141+
if (!FileExists(vsixFilePath)) {
142+
vsixFilePath = context.GetFiles(parameters.Paths.Directories.BuildArtifact + "/*.vsix").First();
143+
}
144+
TfxExtensionPublish(vsixFilePath, settings);
140145
})
141146
.OnError(exception =>
142147
{

build/utils/paths.cake

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ public class BuildPaths
4545
var gemOutputFilePath = buildArtifactDir.CombineWithFilePath("gitversion-" + version.GemVersion + ".gem");
4646

4747
var vsixSuffix = parameters.IsStableRelease() ? "" : "preview-";
48-
var vsixOutputFilePath = buildArtifactDir.CombineWithFilePath("gittools.gitversion-" + vsixSuffix + version.VsixVersion + ".vsix");
49-
if (!context.FileExists(vsixOutputFilePath)) {
50-
vsixOutputFilePath = context.GetFiles(buildArtifactDir + "/*.vsix").First();
51-
}
48+
var vsixOutputFilePath = buildArtifactDir.CombineWithFilePath("gittools.gitversion-" + vsixSuffix + version.VsixVersion + ".vsix");
5249

5350
// Directories
5451
var buildDirectories = new BuildDirectories(

0 commit comments

Comments
 (0)