-
Notifications
You must be signed in to change notification settings - Fork 396
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·61 lines (51 loc) · 1.49 KB
/
build.sh
File metadata and controls
executable file
·61 lines (51 loc) · 1.49 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
#!/usr/bin/env bash
set -e
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
cd $ROOT
echo "======================================="
echo " Building Kernel Memory Solution"
echo "======================================="
echo ""
# Clean previous build artifacts
echo "🔨 Cleaning previous build artifacts..."
dotnet clean --nologo --verbosity quiet
echo "✅ Clean complete"
echo ""
# Restore dependencies
echo "🔨 Restoring dependencies..."
dotnet restore --nologo
echo "✅ Restore complete"
echo ""
# Build solution with strict settings
echo "🔨 Building solution..."
echo ""
# Build with:
# - TreatWarningsAsErrors: Fail on any warnings (compliance requirement)
# - EnforceCodeStyleInBuild: Enforce code style during build
# - NoWarn: Empty (don't suppress any warnings)
dotnet build \
--no-restore \
--configuration Release \
/p:TreatWarningsAsErrors=true \
/p:EnforceCodeStyleInBuild=true \
/warnaserror
BUILD_RESULT=$?
echo ""
if [ $BUILD_RESULT -eq 0 ]; then
echo "======================================="
echo "✅ Build Successful"
echo "======================================="
echo ""
echo "All projects built successfully with zero warnings."
exit 0
else
echo "======================================="
echo "❌ Build Failed"
echo "======================================="
echo ""
echo "Build failed with errors or warnings."
echo "Review the output above for details."
echo ""
echo "Reminder: This project has zero-tolerance for warnings."
exit 1
fi