diff --git a/.gitignore b/.gitignore index 5ed394f7..477afa04 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,6 @@ sdcard/** .output.txt +dist-staging +dist-staging/** + diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 00000000..6e8bf73a --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +0.1.0 diff --git a/crates/prometeu/Cargo.toml b/crates/prometeu/Cargo.toml index aa11dad6..9401f9b5 100644 --- a/crates/prometeu/Cargo.toml +++ b/crates/prometeu/Cargo.toml @@ -10,7 +10,7 @@ name = "prometeu" path = "src/main.rs" [[bin]] -name = "prometeu-runtime-desktop" +name = "prometeu-runtime" path = "../prometeu-runtime-desktop/src/main.rs" # Future binaries (commented) diff --git a/crates/prometeu/devtools-protocol/protocol.json b/crates/prometeu/devtools-protocol/protocol.json deleted file mode 120000 index 2d11ba72..00000000 --- a/crates/prometeu/devtools-protocol/protocol.json +++ /dev/null @@ -1 +0,0 @@ -../../../devtools-protocol/protocol.json \ No newline at end of file diff --git a/dist-workspace.toml b/dist-workspace.toml index 3fc4fed2..a38529f9 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -3,12 +3,15 @@ members = ["cargo:."] # Config for 'dist' [dist] +# The preferred dist version to use in CI (Cargo.toml SemVer syntax) cargo-dist-version = "0.30.3" +# CI backends to support ci = "github" +# The installers to generate for each app installers = [] +# Target platforms to build apps for (Rust target-triple syntax) targets = ["aarch64-apple-darwin", "x86_64-apple-darwin"] -# Future targets (commented) -# targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"] +# The archive format to use for non-windows builds (defaults .tar.xz) unix-archive = ".zip" macos-universal-binaries = true [dist.hooks] diff --git a/scripts/gen-version.sh b/scripts/gen-version.sh index ce9bae29..5ac5552a 100755 --- a/scripts/gen-version.sh +++ b/scripts/gen-version.sh @@ -2,10 +2,4 @@ # 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") echo "$VERSION" > VERSION.txt -echo "Generated VERSION.txt with version $VERSION" - -# Prepare staging for SDK extra files -echo "Preparing dist-staging..." -rm -rf dist-staging -mkdir -p dist-staging/devtools-protocol -cp devtools-protocol/protocol.json dist-staging/devtools-protocol/ +echo "Generated VERSION.txt with version $VERSION" \ No newline at end of file diff --git a/scripts/local-dist.sh b/scripts/local-dist.sh new file mode 100755 index 00000000..1a7eac27 --- /dev/null +++ b/scripts/local-dist.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +./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 \ No newline at end of file