add dist into action
This commit is contained in:
parent
6eb78d9ca5
commit
3726dc989b
3
.gitignore
vendored
3
.gitignore
vendored
@ -51,3 +51,6 @@ sdcard/**
|
|||||||
|
|
||||||
.output.txt
|
.output.txt
|
||||||
|
|
||||||
|
dist-staging
|
||||||
|
dist-staging/**
|
||||||
|
|
||||||
|
|||||||
1
VERSION.txt
Normal file
1
VERSION.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0.1.0
|
||||||
@ -10,7 +10,7 @@ name = "prometeu"
|
|||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "prometeu-runtime-desktop"
|
name = "prometeu-runtime"
|
||||||
path = "../prometeu-runtime-desktop/src/main.rs"
|
path = "../prometeu-runtime-desktop/src/main.rs"
|
||||||
|
|
||||||
# Future binaries (commented)
|
# Future binaries (commented)
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
../../../devtools-protocol/protocol.json
|
|
||||||
@ -3,12 +3,15 @@ members = ["cargo:."]
|
|||||||
|
|
||||||
# Config for 'dist'
|
# Config for 'dist'
|
||||||
[dist]
|
[dist]
|
||||||
|
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
|
||||||
cargo-dist-version = "0.30.3"
|
cargo-dist-version = "0.30.3"
|
||||||
|
# CI backends to support
|
||||||
ci = "github"
|
ci = "github"
|
||||||
|
# The installers to generate for each app
|
||||||
installers = []
|
installers = []
|
||||||
|
# Target platforms to build apps for (Rust target-triple syntax)
|
||||||
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin"]
|
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin"]
|
||||||
# Future targets (commented)
|
# The archive format to use for non-windows builds (defaults .tar.xz)
|
||||||
# targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
|
|
||||||
unix-archive = ".zip"
|
unix-archive = ".zip"
|
||||||
macos-universal-binaries = true
|
macos-universal-binaries = true
|
||||||
[dist.hooks]
|
[dist.hooks]
|
||||||
|
|||||||
@ -3,9 +3,3 @@
|
|||||||
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-runtime-desktop/Cargo.toml | cut -d '"' -f 2 || echo "0.1.0")
|
||||||
echo "$VERSION" > VERSION.txt
|
echo "$VERSION" > VERSION.txt
|
||||||
echo "Generated VERSION.txt with version $VERSION"
|
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/
|
|
||||||
|
|||||||
25
scripts/local-dist.sh
Executable file
25
scripts/local-dist.sh
Executable file
@ -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
|
||||||
Loading…
x
Reference in New Issue
Block a user