forked from SteamRE/DepotDownloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-github-archiver.sh
More file actions
50 lines (41 loc) · 1.19 KB
/
build-github-archiver.sh
File metadata and controls
50 lines (41 loc) · 1.19 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
#!/bin/bash
# Build script for GitHubArchiver.Daemon
# Produces self-contained single-file executables for Windows and Linux
set -e
CONFIGURATION="${1:-Release}"
OUTPUT_DIR="publish/GitHubArchiver.Daemon"
PROJECT_PATH="GitHubArchiver.Daemon/GitHubArchiver.Daemon.csproj"
# Clean output directory
rm -rf "$OUTPUT_DIR"
echo "Building GitHubArchiver.Daemon..."
COMMON_ARGS=(
"--configuration" "$CONFIGURATION"
"-p:PublishSingleFile=true"
"-p:SelfContained=true"
"-p:IncludeNativeLibrariesForSelfExtract=true"
"-p:EnableCompressionInSingleFile=true"
"-p:DebugType=none"
"-p:DebugSymbols=false"
)
# Build for Linux x64
echo ""
echo "Publishing for Linux x64..."
dotnet publish "$PROJECT_PATH" \
--runtime linux-x64 \
--output "$OUTPUT_DIR/linux-x64" \
"${COMMON_ARGS[@]}"
# Build for Windows x64
echo ""
echo "Publishing for Windows x64..."
dotnet publish "$PROJECT_PATH" \
--runtime win-x64 \
--output "$OUTPUT_DIR/win-x64" \
"${COMMON_ARGS[@]}"
echo ""
echo "Build complete!"
echo "Output locations:"
echo " Linux: $OUTPUT_DIR/linux-x64/"
echo " Windows: $OUTPUT_DIR/win-x64/"
echo ""
echo "Output files:"
find "$OUTPUT_DIR" -type f -exec ls -lh {} \;