Skip to content

Commit

Permalink
just: add build command
Browse files Browse the repository at this point in the history
  • Loading branch information
BrewingWeasel committed Nov 17, 2023
1 parent e8115df commit ee6f468
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,37 @@ _cargoinstall program: (_install program replace("cargo install program", "progr
# Set up development related tools
setup-dev: (_cargoinstall "leptosfmt") (_cargoinstall "trunk") (_install "cargo-tauri" "cargo install tauri-cli") (_install "cargo-clippy" "rustup component add clippy")
# TODO: probably lots more that I'm forgetting

pip-command := if `command -v pip` != "" {
"pip"
} else if `command -v pip3` != "" {
"pip3"
} else if `command -v python` != "" {
"python -m pip"
} else if `command -v python3` != "" {
"python3 -m pip"
} else {
error("unable to find pip or python")
}

install_deps_command := "apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev glibc-source libc6 python3-dev"

build: (_install "cargo-tauri" "cargo install tauri-cli") (_cargoinstall "trunk")
#!/usr/bin/env sh
echo "Adding wasm target"
rustup target add wasm32-unknown-unknown
echo "installing spacy"
{{pip-command}} install spacy --upgrade
if command -v apt-get; then
echo "you can install all external dependencies with the following command:"
echo "{{install_deps_command}}"
echo "do you want to run it? (y/N)"
read answer
if [ "$answer" = "y"]; then
{{install_deps_command}}
fi
fi

cargo tauri build
echo "installed successfully"

0 comments on commit ee6f468

Please sign in to comment.