File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 <Using Include =" Cake.Core.Diagnostics" />
2323 <Using Include =" Cake.Core.IO" />
2424 <Using Include =" Cake.FileHelpers" />
25+ <Using Include =" System.Runtime.InteropServices" />
2526 </ItemGroup >
2627
2728 <ItemGroup >
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ public sealed class BuildLinuxTask : FrostingTask<BuildContext>
99
1010 public override void Run ( BuildContext context )
1111 {
12- Architecture arch = RuntimeInformation . OSArchitecture ;
12+ var arch = RuntimeInformation . OSArchitecture ;
1313 // Absolute path to the artifact directory is needed for flags since they don't allow relative path
1414 var artifactDir = context . MakeAbsolute ( new DirectoryPath ( context . ArtifactsDir ) ) ;
1515 var dependencyDir = context . MakeAbsolute ( new DirectoryPath ( $ "{ context . ArtifactsDir } /../dependencies-linux-{ ( arch == Architecture . Arm64 ? "arm64" : "x64" ) } ") ) ;
@@ -84,7 +84,7 @@ private static string GetFFMpegConfigureFlags(BuildContext context)
8484 {
8585 var ignoreCommentsAndNewLines = ( string line ) => ! string . IsNullOrWhiteSpace ( line ) && ! line . StartsWith ( '#' ) ;
8686 var configureFlags = context . FileReadLines ( "ffmpeg.config" ) . Where ( ignoreCommentsAndNewLines ) ;
87- var osConfigFile = arch == Architecture . Arm64 ? "ffmpeg.linux-arm64.config" : "ffmpeg.linux-x64.config" ;
87+ var osConfigFile = RuntimeInformation . OSArchitecture == Architecture . Arm64 ? "ffmpeg.linux-arm64.config" : "ffmpeg.linux-x64.config" ;
8888 var osConfigureFlags = context . FileReadLines ( osConfigFile ) . Where ( ignoreCommentsAndNewLines ) ;
8989 return string . Join ( ' ' , configureFlags ) + " " + string . Join ( ' ' , osConfigureFlags ) ;
9090 }
You can’t perform that action at this time.
0 commit comments