Paul Gschwendtner 9dccaa9570 refactor(dev-infra): move common versioning tooling to shared location (#38656)
We initially added logic for determining active release trains into
the merge script. Given we now build more tools that rely on this
information, we move the logic into a more general "versioning" folder
that can contain common logic following the versioning document for the
Angular organization.

PR Close #38656
2020-09-28 16:11:40 -04:00

22 lines
644 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as semver from 'semver';
/** Class describing a release-train. */
export class ReleaseTrain {
/** Whether the release train is currently targeting a major. */
isMajor = this.version.minor === 0 && this.version.patch === 0;
constructor(
/** Name of the branch for this release-train. */
public branchName: string,
/** Most recent version for this release train. */
public version: semver.SemVer) {}
}