Co-authored-by: Nilton Constantino <nilton.constantino@visma.com> Reviewed-on: #5
33 lines
1.0 KiB
Bash
Executable File
33 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Generate version
|
|
./scripts/gen-version.sh
|
|
|
|
# Prepare staging for SDK extra files
|
|
echo "Preparing dist-staging..."
|
|
rm -rf dist-staging/devtools/debugger-protocol
|
|
rm -rf dist-staging/devtools/typescript-sdk
|
|
|
|
mkdir -p dist-staging/devtools/debugger-protocol
|
|
mkdir -p dist-staging/devtools/typescript-sdk
|
|
|
|
cp devtools/debugger-protocol/protocol.json dist-staging/devtools/debugger-protocol/
|
|
cp -R devtools/typescript-sdk dist-staging/devtools
|
|
cp VERSION.txt dist-staging/devtools/debugger-protocol/VERSION.txt
|
|
cp VERSION.txt dist-staging/devtools/typescript-sdk/VERSION.txt
|
|
|
|
# Clean and prepare the version-specific directory
|
|
echo "Cleaning dist-staging/stable..."
|
|
mkdir -p "dist-staging/stable"
|
|
rm -rf "dist-staging/stable/*"
|
|
|
|
# Build stable using cargo build
|
|
dist build
|
|
|
|
echo "Copying target/distrib content to dist-staging/stable..."
|
|
if [ -d "target/distrib" ] && [ "$(ls -A target/distrib)" ]; then
|
|
cp -r target/distrib/* "dist-staging/stable/"
|
|
else
|
|
echo "Warning: target/dist directory not found or empty."
|
|
fi |