File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ COPY . /root/build
55ARG TARGETARCH
66
77WORKDIR /root/build
8+
89RUN dotnet publish src/HuaJiBot.NET.CLI \
910 -c Release \
1011 -a $TARGETARCH \
@@ -13,12 +14,14 @@ RUN dotnet publish src/HuaJiBot.NET.CLI \
1314 --framework net10.0 \
1415 -o /root/out
1516
17+ RUN dotnet fsi build_plugins.fsx
18+
1619FROM mcr.microsoft.com/dotnet/runtime:10.0-azurelinux3.0-distroless
1720
1821ENV TZ=Asia/Shanghai
1922
20- # COPY --from=build-env /root/out/HuaJiBot.NET.CLI /app/bin/HuaJiBot.NET.CLI
2123COPY --from=build-env /root/out /app/bin
24+ COPY --from=build-env /root/build/bin/plugins /app/data/plugins
2225
2326USER app
2427WORKDIR /app/data
Original file line number Diff line number Diff line change 1- #r " nuget: SharpCompress, 0.36.0 "
1+ #r " nuget: SharpCompress, 0.47.3 "
22open System.IO
33let isWindows = System.OperatingSystem.IsWindows()
44let isDebugBuild = isWindows
@@ -89,12 +89,12 @@ for dir in binDirs do
8989//compress
9090open SharpCompress.Archives
9191open SharpCompress.Archives .Zip
92+ open SharpCompress.Common
9293let compress ()=
9394 let zipFile = Path.Combine( cd, " HuaJiBot.NET.Plugins.zip" )
9495 if zipFile|> File.Exists then File.Delete zipFile
95- use archive = ZipArchive.Create ()
96+ use archive = ZipArchive.CreateArchive ()
9697 archive.AddAllFromDirectory output
97- use fileStream = File.Create zipFile
98- archive.SaveTo fileStream|> ignore
98+ archive.SaveTo( zipFile, CompressionType.Deflate) |> ignore
9999if isWindows then
100100 compress()
You can’t perform that action at this time.
0 commit comments