Create packages only for release builds, and publish when created. (#14476)
This changes the publishing of archives so that it happens on the chrome_infra bots when they build a packaged branch instead of as part of the dev_roll process. It uses the tagged version in the branch, and leaves the git repo that it clones checked out on the branch and hash used to build the package. It updates metadata located at gs://flutter_infra/releases/releases_.json (where is one of macos, linux, or windows) once published, since it would be complex to do the proper locking to keep them all in one shared .json file safely. A separate [change to the chrome_infra bots](https://chromium-review.googlesource.com/c/chromium/tools/build/+/902823) was made to instruct them to build packaged for the dev, beta, and release branches (but not master anymore).
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:args/args.dart';
|
||||
import 'archive_publisher.dart';
|
||||
|
||||
const String kIncrement = 'increment';
|
||||
const String kX = 'x';
|
||||
@@ -114,19 +113,6 @@ void main(List<String> args) {
|
||||
|
||||
final String hash = getGitOutput('rev-parse HEAD', 'Get git hash for $commit');
|
||||
|
||||
final ArchivePublisher publisher = new ArchivePublisher(hash, version, Channel.dev);
|
||||
|
||||
// Check for access early so that we don't try to publish things if the
|
||||
// user doesn't have access to the metadata file.
|
||||
try {
|
||||
publisher.checkForGSUtilAccess();
|
||||
} on ArchivePublisherException {
|
||||
print('You do not appear to have the credentials required to update the archive links.');
|
||||
print('Make sure you have "gsutil" installed, then run "gsutil config".');
|
||||
print('Talk to @gspencergoog for details on which project to use.');
|
||||
exit(1);
|
||||
}
|
||||
|
||||
runGit('tag v$version', 'tag the commit with the version label');
|
||||
|
||||
// PROMPT
|
||||
@@ -140,17 +126,6 @@ void main(List<String> args) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// Publish the archive before pushing the tag so that if something fails in
|
||||
// the publish step, we can clean up.
|
||||
try {
|
||||
publisher.publishArchive();
|
||||
} on ArchivePublisherException catch (e) {
|
||||
print('Archive publishing failed.\n$e');
|
||||
runGit('tag -d v$version', 'remove the tag that was not published');
|
||||
print('The dev roll has been aborted.');
|
||||
exit(1);
|
||||
}
|
||||
|
||||
runGit('push upstream v$version', 'publish the version');
|
||||
runGit('push upstream HEAD:dev', 'land the new version on the "dev" branch');
|
||||
print('Flutter version $version has been rolled to the "dev" channel!');
|
||||
|
||||
Reference in New Issue
Block a user