Skip to content

Commit cb08e7a

Browse files
committed
fix so when running in github actions it doesn't fail on unbuntu
1 parent bb9e70e commit cb08e7a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Ellabit/Ellabit.csproj

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,15 @@
101101
Lines="@(FrameworkDlls->'{ "Name": "%(Filename)", "File": "%(Filename)%(Extension)" }')"
102102
Overwrite="true" />
103103

104-
<!-- Optional: wrap lines in an array -->
105-
<Exec Command="powershell -Command &quot;$json = Get-Content '$(MSBuildProjectDirectory)\framework_manifest.json' -Raw; Set-Content '$(MSBuildProjectDirectory)\framework_manifest.json' ('[' + ($json -replace '(\r?\n)',' , ') + ']')&quot;" />
104+
105+
<!-- Windows version -->
106+
<Exec Condition="'$(OS)' == 'Windows_NT'"
107+
Command="powershell -Command &quot;$json = Get-Content '$(MSBuildProjectDirectory)\framework_manifest.json' -Raw; Set-Content '$(MSBuildProjectDirectory)\framework_manifest.json' ('[' + ($json -replace '(\r?\n)',' , ') + ']')&quot;" />
108+
109+
<!-- Linux / macOS version -->
110+
<Exec Condition="'$(OS)' != 'Windows_NT'"
111+
Command='bash -c "frameworkDir=$(PublishDir)/wwwroot/_framework; echo [ > $frameworkDir/framework_manifest.json; first=true; for dll in $frameworkDir/*.dll; do if [ $first = true ]; then first=false; else echo , >> $frameworkDir/framework_manifest.json; fi; filename=$(basename $dll); name=${filename%%.*}; echo { \\"Name\\": \\"$name\\", \\"File\\": \\"$filename\\" } >> $frameworkDir/framework_manifest.json; done; echo ] >> $frameworkDir/framework_manifest.json"' />
112+
106113
</Target>
107114
<ItemGroup>
108115
<EmbeddedResource Include="framework_manifest.json" />

0 commit comments

Comments
 (0)