Merge pull request #3442 from eerhardt/FixVersionsRepo
CLI dotnet/versions build info files should be separated between the branches
This commit is contained in:
commit
7f13f6d3b6
3 changed files with 9 additions and 11 deletions
|
@ -6,3 +6,4 @@ MINOR_VERSION=0
|
|||
PATCH_VERSION=0
|
||||
RELEASE_SUFFIX=preview2
|
||||
CHANNEL=preview
|
||||
BRANCH_NAME=rel/1.0.0-preview2
|
||||
|
|
|
@ -75,9 +75,9 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
ReleaseSuffix = branchInfo["RELEASE_SUFFIX"],
|
||||
CommitCount = commitCount
|
||||
};
|
||||
|
||||
|
||||
c.BuildContext["BuildVersion"] = buildVersion;
|
||||
|
||||
c.BuildContext["BranchName"] = branchInfo["BRANCH_NAME"];
|
||||
c.BuildContext["CommitHash"] = commitHash;
|
||||
|
||||
c.Info($"Building Version: {buildVersion.SimpleVersion} (NuGet Packages: {buildVersion.NuGetVersion})");
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
private static string Channel { get; set; }
|
||||
|
||||
private static string CliVersion { get; set; }
|
||||
|
||||
private static string CliNuGetVersion { get; set; }
|
||||
|
||||
private static string SharedFrameworkNugetVersion { get; set; }
|
||||
|
@ -27,7 +25,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
AzurePublisherTool = new AzurePublisher();
|
||||
DebRepoPublisherTool = new DebRepoPublisher(Dirs.Packages);
|
||||
|
||||
CliVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
||||
CliNuGetVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||
SharedFrameworkNugetVersion = CliDependencyVersions.SharedFrameworkVersion;
|
||||
Channel = c.BuildContext.Get<string>("Channel");
|
||||
|
@ -107,6 +104,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
AzurePublisherTool.PublishStringToBlob($"{Channel}/dnvm/latest.{version}", cliVersion);
|
||||
}
|
||||
|
||||
UpdateVersionsRepo(c);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -288,17 +287,15 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PrepareTargets.Init))]
|
||||
public static BuildTargetResult UpdateVersionsRepo(BuildTargetContext c)
|
||||
private static void UpdateVersionsRepo(BuildTargetContext c)
|
||||
{
|
||||
string githubAuthToken = EnvVars.EnsureVariable("GITHUB_PASSWORD");
|
||||
string nupkgFilePath = EnvVars.EnsureVariable("NUPKG_FILE_PATH");
|
||||
string versionsRepoPath = EnvVars.EnsureVariable("VERSIONS_REPO_PATH");
|
||||
string nupkgFilePath = Dirs.Packages;
|
||||
string branchName = c.BuildContext.Get<string>("BranchName");
|
||||
string versionsRepoPath = $"build-info/dotnet/cli/{branchName}/Latest";
|
||||
|
||||
VersionRepoUpdater repoUpdater = new VersionRepoUpdater(githubAuthToken);
|
||||
repoUpdater.UpdatePublishedVersions(nupkgFilePath, versionsRepoPath).Wait();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue