-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·26 lines (19 loc) · 1.04 KB
/
build.sh
File metadata and controls
executable file
·26 lines (19 loc) · 1.04 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
#!/bin/bash
# Script to build the BCFileDecryptor project
echo "Building BCFileDecryptor..."
dotnet build --configuration Release
echo "Running tests..."
dotnet test --no-build --configuration Release
read -p "Do you want to create standalone executables? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Creating standalone executables..."
echo "Building for Windows..."
dotnet publish BCFileDecryptor/BCFileDecryptor.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -o publish/win-x64
echo "Building for Linux..."
dotnet publish BCFileDecryptor/BCFileDecryptor.csproj -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -o publish/linux-x64
echo "Building for macOS..."
dotnet publish BCFileDecryptor/BCFileDecryptor.csproj -c Release -r osx-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -o publish/osx-x64
echo "Done! Executables are available in the 'publish' directory."
fi