[flutter_conductor] ensure release branch point is always tagged (#93082)
This commit is contained in:
committed by
GitHub
parent
4dd56df426
commit
2107fef430
@@ -125,10 +125,14 @@ void main() {
|
||||
test('creates state file if provided correct inputs', () async {
|
||||
const String revision2 = 'def789';
|
||||
const String revision3 = '123abc';
|
||||
const String branchPointRevision='deadbeef';
|
||||
const String previousDartRevision = '171876a4e6cf56ee6da1f97d203926bd7afda7ef';
|
||||
const String nextDartRevision = 'f6c91128be6b77aef8351e1e3a9d07c85bc2e46e';
|
||||
const String previousVersion = '1.2.0-1.0.pre';
|
||||
const String nextVersion = '1.2.0-3.0.pre';
|
||||
// This is a git tag applied to the branch point, not an actual release
|
||||
const String branchPointTag = '1.2.0-3.0.pre';
|
||||
// This is what this release will be
|
||||
const String nextVersion = '1.2.0-3.1.pre';
|
||||
const String incrementLevel = 'm';
|
||||
|
||||
final Directory engine = fileSystem.directory(checkoutsParentDirectory)
|
||||
@@ -243,6 +247,16 @@ void main() {
|
||||
],
|
||||
stdout: '$previousVersion-42-gabc123',
|
||||
),
|
||||
const FakeCommand(
|
||||
command: <String>['git', 'merge-base', candidateBranch, 'master'],
|
||||
stdout: branchPointRevision,
|
||||
),
|
||||
const FakeCommand(
|
||||
command: <String>['git', 'tag', branchPointTag, branchPointRevision],
|
||||
),
|
||||
const FakeCommand(
|
||||
command: <String>['git', 'push', FrameworkRepository.defaultUpstream, branchPointTag],
|
||||
),
|
||||
const FakeCommand(
|
||||
command: <String>['git', 'rev-parse', 'HEAD'],
|
||||
stdout: revision3,
|
||||
@@ -300,6 +314,9 @@ void main() {
|
||||
expect(state.currentPhase, ReleasePhase.APPLY_ENGINE_CHERRYPICKS);
|
||||
expect(state.conductorVersion, conductorVersion);
|
||||
expect(state.incrementLevel, incrementLevel);
|
||||
expect(stdio.stdout, contains('Applying the tag $branchPointTag at the branch point $branchPointRevision'));
|
||||
expect(stdio.stdout, contains('The actual release will be version $nextVersion'));
|
||||
expect(branchPointTag != nextVersion, true);
|
||||
});
|
||||
|
||||
test('can convert from dev style version to stable version', () async {
|
||||
|
||||
Reference in New Issue
Block a user