mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Add iOS archive codesign test (#77428)
This commit is contained in:
parent
e5322acc77
commit
ac6e3f87b2
@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter_devicelab/framework/apk_utils.dart';
|
import 'package:flutter_devicelab/framework/apk_utils.dart';
|
||||||
import 'package:flutter_devicelab/framework/framework.dart';
|
import 'package:flutter_devicelab/framework/framework.dart';
|
||||||
import 'package:flutter_devicelab/framework/task_result.dart';
|
import 'package:flutter_devicelab/framework/task_result.dart';
|
||||||
@ -28,16 +30,38 @@ Future<void> main() async {
|
|||||||
'Runner.xcarchive',
|
'Runner.xcarchive',
|
||||||
);
|
);
|
||||||
|
|
||||||
checkDirectoryExists(path.join(
|
final String products = path.join(archivePath, 'Products');
|
||||||
archivePath,
|
|
||||||
'Products',
|
checkDirectoryExists(products);
|
||||||
));
|
|
||||||
|
|
||||||
checkDirectoryExists(path.join(
|
checkDirectoryExists(path.join(
|
||||||
archivePath,
|
archivePath,
|
||||||
'dSYMs',
|
'dSYMs',
|
||||||
'Runner.app.dSYM',
|
'Runner.app.dSYM',
|
||||||
));
|
));
|
||||||
|
final Directory applications = Directory(path.join(products, 'Applications'));
|
||||||
|
|
||||||
|
final Directory appBundle = applications
|
||||||
|
.listSync()
|
||||||
|
.whereType<Directory>()
|
||||||
|
.singleWhere((Directory directory) => path.extension(directory.path) == '.app', orElse: () => null);
|
||||||
|
|
||||||
|
final String flutterFramework = path.join(
|
||||||
|
appBundle.path,
|
||||||
|
'Frameworks',
|
||||||
|
'Flutter.framework',
|
||||||
|
'Flutter',
|
||||||
|
);
|
||||||
|
// Exits 0 only if codesigned.
|
||||||
|
eval('xcrun', <String>['codesign', '--verify', flutterFramework]);
|
||||||
|
|
||||||
|
final String appFramework = path.join(
|
||||||
|
appBundle.path,
|
||||||
|
'Frameworks',
|
||||||
|
'App.framework',
|
||||||
|
'App',
|
||||||
|
);
|
||||||
|
eval('xcrun', <String>['codesign', '--verify', appFramework]);
|
||||||
});
|
});
|
||||||
|
|
||||||
return TaskResult.success(null);
|
return TaskResult.success(null);
|
||||||
|
Loading…
Reference in New Issue
Block a user