-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·37 lines (31 loc) · 1.29 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·37 lines (31 loc) · 1.29 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
#!/usr/bin/env bash
# fuseraft CLI build bootstrapper (Linux/macOS)
#
# Usage:
# ./build.sh # Run Default target (Publish)
# ./build.sh --target=Build
# ./build.sh --target=Pack --runtime=linux-x64
# ./build.sh --configuration=Debug --target=Test
# ./build.sh --target=Lint
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
###############################################################################
# 1. Require dotnet SDK
###############################################################################
if ! command -v dotnet &>/dev/null; then
echo "ERROR: 'dotnet' not found. Install the .NET SDK from https://dot.net" >&2
exit 1
fi
DOTNET_VERSION=$(dotnet --version)
echo "Using .NET SDK $DOTNET_VERSION"
###############################################################################
# 2. Restore local tools (includes cake.tool)
###############################################################################
echo "Restoring local dotnet tools..."
dotnet tool restore --verbosity quiet
###############################################################################
# 3. Run Cake
###############################################################################
echo "Starting Cake build..."
dotnet cake build.cake "$@"