Files

26 lines
650 B
Bash
Raw Permalink Normal View History

2024-01-01 14:42:19 +00:00
#!/bin/bash
set -e
2024-01-01 14:42:19 +00:00
# Find the absolute path of the script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Check if version parameter is provided
if [ "$#" -ne 1 ]; then
echo "Version number is required."
echo "Usage: ./build.sh [version]"
2024-01-01 14:42:19 +00:00
exit 1
fi
BUILD_VERSION="$1"
RELEASE_DIR="$SCRIPT_DIR/releases"
PUBLISH_DIR="$SCRIPT_DIR/publish"
2024-01-01 14:42:19 +00:00
echo ""
echo "Compiling Rust/Iced with cargo..."
cargo build -r
mkdir publish
cp target/release/velorusticedsample publish/VeloRustIcedSample
2024-01-01 14:42:19 +00:00
echo ""
echo "Building Velopack Release v$BUILD_VERSION"
2024-09-30 09:33:18 -06:00
vpk pack -u VeloRustIcedSample -v $BUILD_VERSION -o "$RELEASE_DIR" -p "$PUBLISH_DIR"