Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
912279bf
Commit
912279bf
authored
Mar 24, 2017
by
Sarah Zakarias
Committed by
GitHub
Mar 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch Debug/Release.xcconfig files in devicelab tests (#9000)
parent
3c99272c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
ios.dart
dev/devicelab/lib/framework/ios.dart
+23
-12
No files found.
dev/devicelab/lib/framework/ios.dart
View file @
912279bf
...
...
@@ -17,26 +17,37 @@ const FileSystem _fs = const io.LocalFileSystem();
/// information required to build and run the project.
Future
<
Null
>
prepareProvisioningCertificates
(
String
flutterProjectPath
)
async
{
final
String
certificateConfig
=
await
_readProvisioningConfigFile
();
await
_patch
FlutterXcconfig
IfNotPatched
(
flutterProjectPath
);
await
_patch
XcconfigFiles
IfNotPatched
(
flutterProjectPath
);
final
File
testXcconfig
=
_fs
.
file
(
path
.
join
(
flutterProjectPath
,
'ios/Flutter/
$_kTestXcconfigFileName
'
));
await
testXcconfig
.
writeAsString
(
certificateConfig
);
}
Future
<
Null
>
_patchFlutterXcconfigIfNotPatched
(
String
flutterProjectPath
)
async
{
final
File
flutterXcconfig
=
_fs
.
file
(
path
.
join
(
flutterProjectPath
,
'ios/Flutter/Flutter.xcconfig'
));
if
(!(
await
flutterXcconfig
.
exists
()))
{
throw
'File not found:
${flutterXcconfig.path}
'
;
Future
<
Null
>
_patchXcconfigFilesIfNotPatched
(
String
flutterProjectPath
)
async
{
final
List
<
File
>
xcconfigFiles
=
<
File
>[
_fs
.
file
(
path
.
join
(
flutterProjectPath
,
'ios/Flutter/Flutter.xcconfig'
)),
_fs
.
file
(
path
.
join
(
flutterProjectPath
,
'ios/Flutter/Debug.xcconfig'
)),
_fs
.
file
(
path
.
join
(
flutterProjectPath
,
'ios/Flutter/Release.xcconfig'
))
];
bool
xcconfigFileExists
=
false
;
for
(
final
File
file
in
xcconfigFiles
)
{
if
((
await
file
.
exists
()))
{
xcconfigFileExists
=
true
;
const
String
include
=
'#include "
$_kTestXcconfigFileName
"'
;
final
String
contents
=
await
file
.
readAsString
();
if
(!
contents
.
contains
(
include
))
{
final
IOSink
patchOut
=
file
.
openWrite
(
mode:
FileMode
.
APPEND
);
patchOut
.
writeln
(
include
);
await
patchOut
.
close
();
}
}
}
const
String
include
=
'#include "
$_kTestXcconfigFileName
"'
;
final
String
contents
=
await
flutterXcconfig
.
readAsString
();
if
(!
contents
.
contains
(
include
))
{
final
IOSink
patchOut
=
flutterXcconfig
.
openWrite
(
mode:
FileMode
.
APPEND
);
patchOut
.
writeln
(
include
);
await
patchOut
.
close
();
}
if
(!
xcconfigFileExists
)
throw
'No xcconfig file found'
;
}
Future
<
String
>
_readProvisioningConfigFile
()
async
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment