Skip to content

Latest commit

 

History

History
76 lines (60 loc) · 2.63 KB

README.md

File metadata and controls

76 lines (60 loc) · 2.63 KB

Homestar NPM packages

Packages

Usage

npx homestar-runtime --help

# Global install
npm install -g homestar-runtime
homestar start -c config.toml

Manual publishing

rustup target add aarch64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-musl
cargo install cargo-get


export node_version=$(cargo get workspace.package.version)
export bin="homestar"


## darwin arm64
cargo build -p homestar-runtime --features ansi-logs --locked --release --target aarch64-apple-darwin
export node_os=darwin
export node_arch=arm64
export node_pkg="${bin}-${node_os}-${node_arch}"
mkdir -p "binaries/${node_pkg}/bin"
envsubst < package.json.tmpl > "binaries/${node_pkg}/package.json"
cp "../../target/aarch64-apple-darwin/release/${bin}" "binaries/${node_pkg}/bin"

## darwin x64
cross build -p homestar-runtime --features ansi-logs --locked --release --target x86_64-apple-darwin
export node_os=darwin
export node_arch=x64
export node_pkg="${bin}-${node_os}-${node_arch}"
mkdir -p "binaries/${node_pkg}/bin"
envsubst < package.json.tmpl > "binaries/${node_pkg}/package.json"
cp "../../target/x86_64-apple-darwin/release/${bin}" "binaries/${node_pkg}/bin"

## linux arm64
cross build -p homestar-runtime --features ansi-logs --locked --release --target aarch64-unknown-linux-gnu
export node_os=linux
export node_arch=arm64
export node_pkg="${bin}-${node_os}-${node_arch}"
mkdir -p "binaries/${node_pkg}/bin"
envsubst < package.json.tmpl > "binaries/${node_pkg}/package.json"
cp "../../target/aarch64-unknown-linux-gnu/release/${bin}" "binaries/${node_pkg}/bin"

## linux x64
cross build -p homestar-runtime --features ansi-logs --locked --release --target x86_64-unknown-linux-musl
export node_os=linux
export node_arch=x64
export node_pkg="${bin}-${node_os}-${node_arch}"
mkdir -p "binaries/${node_pkg}/bin"
envsubst < package.json.tmpl > "binaries/${node_pkg}/package.json"
cp "../../target/x86_64-unknown-linux-musl/release/${bin}" "binaries/${node_pkg}/bin"

# publish the RC package
cd "${node_pkg}"
npm version $(cargo get package.version)-rc.$(date +%s) --git-tag-version false
npm publish --access public --tag rc