forked from toniebox-reverse-engineering/teddy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-release.sh
More file actions
executable file
·147 lines (126 loc) · 4.41 KB
/
build-release.sh
File metadata and controls
executable file
·147 lines (126 loc) · 4.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/bin/bash
set -e
VERSION="${1:-v1.0.0}"
OUTPUT_DIR="release-builds/$VERSION"
echo "Building Teddy release $VERSION"
echo "================================"
# Clean previous builds
rm -rf "$OUTPUT_DIR"
mkdir -p "$OUTPUT_DIR"
# Build CLI for all platforms
echo ""
echo "Building Teddy CLI..."
echo "---------------------"
# Windows x64
echo "Building Windows x64..."
dotnet publish Teddy/Teddy.csproj \
-c Release \
-r win-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:EnableCompressionInSingleFile=true \
-o "$OUTPUT_DIR/teddy-$VERSION-win-x64"
# Linux x64
echo "Building Linux x64..."
dotnet publish Teddy/Teddy.csproj \
-c Release \
-r linux-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:EnableCompressionInSingleFile=true \
-o "$OUTPUT_DIR/teddy-$VERSION-linux-x64"
# macOS x64 (Intel)
echo "Building macOS x64..."
dotnet publish Teddy/Teddy.csproj \
-c Release \
-r osx-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:EnableCompressionInSingleFile=true \
-o "$OUTPUT_DIR/teddy-$VERSION-osx-x64"
# macOS ARM64 (Apple Silicon)
echo "Building macOS ARM64..."
dotnet publish Teddy/Teddy.csproj \
-c Release \
-r osx-arm64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:EnableCompressionInSingleFile=true \
-o "$OUTPUT_DIR/teddy-$VERSION-osx-arm64"
# Build GUI for all platforms
echo ""
echo "Building TeddyBench.Avalonia GUI..."
echo "-----------------------------------"
# Windows x64
echo "Building GUI for Windows x64..."
dotnet publish TeddyBench.Avalonia/TeddyBench.Avalonia.csproj \
-c Release \
-r win-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:EnableCompressionInSingleFile=true \
-o "$OUTPUT_DIR/teddybench-$VERSION-win-x64"
# Linux x64
echo "Building GUI for Linux x64..."
dotnet publish TeddyBench.Avalonia/TeddyBench.Avalonia.csproj \
-c Release \
-r linux-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:EnableCompressionInSingleFile=true \
-o "$OUTPUT_DIR/teddybench-$VERSION-linux-x64"
# macOS x64 (Intel)
echo "Building GUI for macOS x64..."
dotnet publish TeddyBench.Avalonia/TeddyBench.Avalonia.csproj \
-c Release \
-r osx-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:EnableCompressionInSingleFile=true \
-o "$OUTPUT_DIR/teddybench-$VERSION-osx-x64"
# macOS ARM64 (Apple Silicon)
echo "Building GUI for macOS ARM64..."
dotnet publish TeddyBench.Avalonia/TeddyBench.Avalonia.csproj \
-c Release \
-r osx-arm64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:EnableCompressionInSingleFile=true \
-o "$OUTPUT_DIR/teddybench-$VERSION-osx-arm64"
# Create archives
echo ""
echo "Creating release archives..."
echo "----------------------------"
cd "$OUTPUT_DIR"
# Windows archives
echo "Creating Windows archives..."
cd teddy-$VERSION-win-x64 && zip -q ../teddy-$VERSION-win-x64.zip Teddy.exe && cd ..
cd teddybench-$VERSION-win-x64 && zip -q ../teddybench-$VERSION-win-x64.zip TeddyBench.Avalonia.exe appsettings.json && cd ..
# Linux archives
echo "Creating Linux archives..."
cd teddy-$VERSION-linux-x64 && tar czf ../teddy-$VERSION-linux-x64.tar.gz Teddy && cd ..
cd teddybench-$VERSION-linux-x64 && tar czf ../teddybench-$VERSION-linux-x64.tar.gz TeddyBench.Avalonia appsettings.json && cd ..
# macOS x64 archives
echo "Creating macOS x64 archives..."
cd teddy-$VERSION-osx-x64 && tar czf ../teddy-$VERSION-osx-x64.tar.gz Teddy && cd ..
cd teddybench-$VERSION-osx-x64 && tar czf ../teddybench-$VERSION-osx-x64.tar.gz TeddyBench.Avalonia appsettings.json && cd ..
# macOS ARM64 archives
echo "Creating macOS ARM64 archives..."
cd teddy-$VERSION-osx-arm64 && tar czf ../teddy-$VERSION-osx-arm64.tar.gz Teddy && cd ..
cd teddybench-$VERSION-osx-arm64 && tar czf ../teddybench-$VERSION-osx-arm64.tar.gz TeddyBench.Avalonia appsettings.json && cd ..
cd ../..
echo ""
echo "Build complete!"
echo "==============="
echo "Release artifacts created in: $OUTPUT_DIR"
echo ""
echo "Archives ready for GitHub release:"
ls -lh "$OUTPUT_DIR"/*.zip "$OUTPUT_DIR"/*.tar.gz 2>/dev/null || true