File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ .PHONY : all clean linux-x64 win-x64 linux-arm64 linux-arm
2
+
3
+ linux-x64 :
4
+ dotnet publish -c Release -r linux-x64 -p:PublishDir=bin/publish_dist/linux-x64/ -p:PublishSingleFile=true --self-contained true
5
+ win-x64 :
6
+ dotnet publish -c Release -r win-x64 -p:PublishDir=bin/publish_dist/win-x64/ -p:PublishSingleFile=true --self-contained true
7
+ linux-arm64 :
8
+ dotnet publish -c Release -r linux-arm64 -p:PublishDir=bin/publish_dist/linux-arm64/ -p:PublishSingleFile=true --self-contained true
9
+ linux-arm :
10
+ dotnet publish -c Release -r linux-arm -p:PublishDir=bin/publish_dist/linux-arm/ -p:PublishSingleFile=true --self-contained true
11
+
12
+ all : | linux-x64 win-x64 linux-arm64 linux-arm
13
+
14
+ dist : | all
15
+ ifeq ($(OS ) , Windows_NT)
16
+ # Windows-specific commands
17
+ @echo "Creating zip file in Windows"
18
+ powershell Compress-Archive -Path bin/publish_dist/* -DestinationPath bin/publish_dist.zip
19
+ else
20
+ # Linux commands
21
+ @echo "Creating tar.gz file in Linux"
22
+ cd ./bin/publish_dist/; tar -czvf ../publish_dist.tar.gz *
23
+ endif
24
+
25
+ clean :
26
+ ifeq ($(OS ) , Windows_NT)
27
+ # Windows-specific commands
28
+ if exist bin\ (rmdir /s /q bin) else echo "bin not found, skipping clean"
29
+ if exist obj\ (rmdir /s /q obj) else echo "obj not found, skipping clean"
30
+ else
31
+ # Linux commands
32
+ @if [ -d bin ]; then rm -rf bin; else echo "bin not found, skipping clean"; fi
33
+ @if [ -d obj ]; then rm -rf obj; else echo "obj not found, skipping clean"; fi
34
+ endif
You can’t perform that action at this time.
0 commit comments