aspnet / Coherence

A build that verifies that all the packages form a consistent graph.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Convert branches for things that shipped into tags

pranavkm opened this issue · comments

We haven't done this in a couple of patch releases, but we should revive the practice of turning our branches in to tags once we're done shipping.

Can you remind us why we would do this?

The idea is that tags are meant to be immutable (or at least less mutable than branches), can be associated with a GitHub release and it's cleanly tucked away in the UI with all other releases

image. That said @smitpatel did most of the conversion for the patch and preview releases. rel/2.0.0 is left, but we'd have to wait until after it's shipped to do the conversion.

Also, another useful outcome of having branches is that it disappears from TeamCity's dropdown of working branches.

Ok, assigning to @smitpatel if there's anything to do for 2.0.0.

Before converting to tags, we may need to pin versions if they are floating. (or we can just leave it as is).

I will be updating NuGet.config files and converting to tags once our packages are on nuget.org

We should pin dependency versions, build tool versions (KoreBuild floats versions) and product version when we create the 2.0.0 tags.

co-assigned @pranavkm to pin all required versions as needed.

Let's get this sorted today \ tomorrow.

This is done for 2.0.0. Here's my super hacky script for pinning versions in case that's of interest for aspnet/Universe#528

ls | %{
    pushd $_

    cp ..\NuGet.config .
    $deps = [IO.Path]::Combine($_.FullName, 'build', 'dependencies.props')
    $content = [IO.File]::ReadAllText($deps)
    $content = $content.Replace("<XunitVersion>2.3.0-beta2-*</XunitVersion>", "<XunitVersion>2.3.0-beta2-build3683</XunitVersion>`n    <XunitRunnerVisualStudioVersion>2.3.0-beta2-build1317</XunitRunnerVisualStudioVersion>")
    $content = $content.Replace("<XunitVersion>2.3.0-*</XunitVersion>", "<XunitVersion>2.3.0-beta2-build3683</XunitVersion>`n    <XunitRunnerVisualStudioVersion>2.3.0-beta2-build1317</XunitRunnerVisualStudioVersion>")
    $content = $content.Replace("<InternalAspNetCoreSdkVersion>2.0.1-*</InternalAspNetCoreSdkVersion>", "<InternalAspNetCoreSdkVersion>2.0.1-rtm-15400</InternalAspNetCoreSdkVersion>")
    
    $content = $content.Replace("-*", $nul)

    [IO.File]::WriteAllText($deps, $content, [System.Text.Encoding]::UTF8)
    
    $versionFile = Join-Path $_.FullName 'version.props'
    $version = [IO.File]::ReadAllText($versionFile)
    [IO.File]::WriteAllText($versionFile, $version.Replace("        <VersionSuffix>rtm</VersionSuffix>`r`n", $nul).Replace("    <VersionSuffix>rtm</VersionSuffix>`r`n", $nul))
    
    ls -r *.csproj | %{
        $content = [IO.File]::ReadAllText($_.FullName)
        $updated = $content.Replace('<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />', '<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioVersion)" />')
        if ($content -ne $updated) {
            [IO.File]::WriteAllText($_.FullName, $updated, [System.Text.Encoding]::UTF8)
        }
    }
    
    git commit -am "Pinning versions for 2.0.0"
    
    popd
}

Great job!

@pranavkm - Can we do this for patch 1.0.x & 2.0.x series too? There is too much branch clutter now since for some reason we are creating rel & patch both branches.