dev/prometeuc-improvements (#5)
Co-authored-by: Nilton Constantino <nilton.constantino@visma.com> Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
cargo clean
|
||||
rm -rf dist-staging
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Get version from git tag or fallback to Cargo.toml version
|
||||
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || grep -m 1 '^version =' crates/prometeu-runtime-desktop/Cargo.toml | cut -d '"' -f 2 || echo "0.1.0")
|
||||
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || grep -m 1 '^version =' crates/prometeu/Cargo.toml | cut -d '"' -f 2 || echo "0.1.0")
|
||||
echo "$VERSION" > VERSION.txt
|
||||
echo "Generated VERSION.txt with version $VERSION"
|
||||
+17
-9
@@ -1,25 +1,33 @@
|
||||
#!/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/
|
||||
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/$VERSION..."
|
||||
rm -rf "dist-staging/stable/$VERSION"
|
||||
mkdir -p "dist-staging/stable/$VERSION"
|
||||
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/$VERSION..."
|
||||
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/$VERSION/"
|
||||
cp -r target/distrib/* "dist-staging/stable/"
|
||||
else
|
||||
echo "Warning: target/dist directory not found or empty."
|
||||
fi
|
||||
Reference in New Issue
Block a user