prometeu-runtime/scripts/local-dist.sh
Nilton Constantino b7425e5a20
compiler with dist
2026-01-21 06:50:57 +00:00

27 lines
762 B
Bash
Executable File

#!/bin/bash
set -e
# Generate version
./scripts/gen-version.sh
VERSION=$(cat VERSION.txt)
# Prepare staging for SDK extra files
echo "Preparing dist-staging..."
mkdir -p dist-staging/devtools-protocol
cp devtools-protocol/protocol.json dist-staging/devtools-protocol/
# Clean and prepare the version-specific directory
echo "Cleaning dist-staging/stable/$VERSION..."
rm -rf "dist-staging/stable/$VERSION"
mkdir -p "dist-staging/stable/$VERSION"
# Build stable using cargo build
dist build
echo "Copying target/distrib content to dist-staging/stable/$VERSION..."
if [ -d "target/distrib" ] && [ "$(ls -A target/distrib)" ]; then
cp -r target/distrib/* "dist-staging/stable/$VERSION/"
else
echo "Warning: target/dist directory not found or empty."
fi