feat: scaffold owlry-plugins workspace
This commit is contained in:
52
justfile
Normal file
52
justfile
Normal file
@@ -0,0 +1,52 @@
|
||||
default:
|
||||
@just --list
|
||||
|
||||
build:
|
||||
cargo build --workspace
|
||||
|
||||
release:
|
||||
cargo build --workspace --release
|
||||
|
||||
check:
|
||||
cargo check --workspace
|
||||
cargo clippy --workspace
|
||||
|
||||
test:
|
||||
cargo test --workspace
|
||||
|
||||
fmt:
|
||||
cargo fmt --all
|
||||
|
||||
plugin name:
|
||||
cargo build -p owlry-plugin-{{name}} --release
|
||||
|
||||
plugins:
|
||||
cargo build --workspace --release
|
||||
|
||||
show-versions:
|
||||
@for dir in crates/owlry-plugin-* crates/owlry-lua crates/owlry-rune; do \
|
||||
name=$$(basename $$dir); \
|
||||
version=$$(grep '^version' $$dir/Cargo.toml | head -1 | cut -d'"' -f2); \
|
||||
printf "%-35s %s\n" "$$name" "$$version"; \
|
||||
done
|
||||
|
||||
bump-crate crate new_version:
|
||||
@cd crates/{{crate}} && \
|
||||
sed -i 's/^version = ".*"/version = "{{new_version}}"/' Cargo.toml
|
||||
@echo "Bumped {{crate}} to {{new_version}}"
|
||||
|
||||
bump-all new_version:
|
||||
@for dir in crates/owlry-plugin-* crates/owlry-lua crates/owlry-rune; do \
|
||||
sed -i 's/^version = ".*"/version = "{{new_version}}"/' $$dir/Cargo.toml; \
|
||||
done
|
||||
@echo "Bumped all crates to {{new_version}}"
|
||||
|
||||
install-local:
|
||||
just plugins
|
||||
@for f in target/release/libowlry_plugin_*.so; do \
|
||||
sudo install -Dm755 "$$f" /usr/lib/owlry/plugins/$$(basename "$$f"); \
|
||||
done
|
||||
@for f in target/release/libowlry_lua.so target/release/libowlry_rune.so; do \
|
||||
[ -f "$$f" ] && sudo install -Dm755 "$$f" /usr/lib/owlry/runtimes/$$(basename "$$f"); \
|
||||
done
|
||||
@echo "Installed all plugins and runtimes"
|
||||
Reference in New Issue
Block a user