Upload checksums for installation artifacts (#4191)
The checksums are SHA-512 hashes, which users can use to verify file integrity and authenticity.
This commit is contained in:
parent
3e1eb008e2
commit
3ae14ab618
11 changed files with 402 additions and 200 deletions
27
build_projects/dotnet-cli-build/UpdateVersionsRepo.cs
Normal file
27
build_projects/dotnet-cli-build/UpdateVersionsRepo.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class UpdateVersionsRepo : Task
|
||||
{
|
||||
[Required]
|
||||
public string BranchName { get; set; }
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
string githubAuthToken = EnvVars.EnsureVariable("GITHUB_PASSWORD");
|
||||
string nupkgFilePath = Dirs.Packages;
|
||||
string branchName = BranchName;
|
||||
string versionsRepoPath = $"build-info/dotnet/cli/{branchName}/Latest";
|
||||
|
||||
VersionRepoUpdater repoUpdater = new VersionRepoUpdater(githubAuthToken);
|
||||
repoUpdater.UpdatePublishedVersions(nupkgFilePath, versionsRepoPath).Wait();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue