forked from rgbcraft/NewRGBLauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-linux.sh
More file actions
executable file
·31 lines (24 loc) · 997 Bytes
/
build-linux.sh
File metadata and controls
executable file
·31 lines (24 loc) · 997 Bytes
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
#!/bin/bash
# Find the absolute path of the script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Check if version parameter is provided
if [ "$#" -ne 2 ]; then
echo "Version number is required."
echo "Usage: ./build.sh [version]"
exit 1
fi
BUILD_VERSION="$1"
RELEASE_DIR="$SCRIPT_DIR/releases"
PUBLISH_DIR="$SCRIPT_DIR/publish"
echo ""
echo "Compiling NewRGB with dotnet..."
dotnet publish -c Release --self-contained -r linux-x64 -o "$PUBLISH_DIR"
echo ""
echo "Downloading latest release"
vpk download github --repoUrl "https://github.com/Enn3Developer/NewRGBLauncher"
echo ""
echo "Building Velopack Release v$BUILD_VERSION"
vpk pack -u NewRGB -v "$BUILD_VERSION" -o "$RELEASE_DIR" -p "$PUBLISH_DIR" --releaseNotes release_notes.md --packTitle "NewRGBLauncher" --icon "Assets/RGB.ico"
echo ""
echo "Uploading..."
vpk upload github --repoUrl "https://github.com/Enn3Developer/NewRGBLauncher" --merge --releaseName "v$1" --tag "$1" --token "$2" -o "$RELEASE_DIR"