Skip to content

Commit

Permalink
use local tool over global tool
Browse files Browse the repository at this point in the history
  • Loading branch information
aspriddell committed Nov 4, 2024
1 parent 8ba6205 commit b3c086a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Distribution/VelopackBuildDistributor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ public virtual async Task RestoreBuild()
return;
}

await Program.RunCommand("vpk", $"download github"
await Program.RunCommand("dotnet", $"tool run vpk download github"
+ $" --pre"
+ $" --repoUrl=\"{Program.GitHubRepoUrl}\""
+ $" --token=\"{Program.GitHubAccessToken}\""
+ $" --channel=\"{_channel}\""
+ $" --outputDir=\"{Program.ReleasesDirectory}\"",
useSolutionPath: false, throwOnError: false);
throwOnError: false);
}


public virtual async Task PublishBuild(string version)
{
await Program.RunCommand("vpk", $"[{_operatingSystemName}] pack"
await Program.RunCommand("dotnet", $"tool run vpk [{_operatingSystemName}] pack"
+ $" --packTitle=\"{PackTitle}\""
+ $" --packAuthors=\"DragonFruit Network\""
+ $" --packId=\"{Program.VelopackId}\""
Expand All @@ -54,14 +54,12 @@ await Program.RunCommand("vpk", $"[{_operatingSystemName}] pack"
+ $" --channel=\"{_channel}\""
+ $" --runtime=\"{_runtimeIdentifier}\""
+ " --verbose"
+ $" {_extraArgs}",
useSolutionPath: false);
+ $" {_extraArgs}");

if (Program.CanUseGitHub)
{
Log.Information("Uploading release {version:l}-{channel:l} to GitHub", version, _channel);

await Program.RunCommand("vpk", $"upload github"
await Program.RunCommand("dotnet", $"tool run vpk upload github"
+ $" --repoUrl=\"{Program.GitHubRepoUrl}\""
+ $" --token=\"{Program.GitHubAccessToken}\""
+ $" --outputDir=\"{Program.ReleasesDirectory}\""
Expand Down

0 comments on commit b3c086a

Please sign in to comment.