mirror of
https://example.com
synced 2024-11-22 14:46:38 +09:00
dev: update neko/index.js only when rusty stuff are updated
This commit is contained in:
parent
e1b2b2a10d
commit
7d5e062a21
1 changed files with 6 additions and 3 deletions
9
Makefile
9
Makefile
|
@ -9,13 +9,17 @@ RUST_DIR := packages/backend/native-utils
|
|||
CARGO_TOMLS := $(RUST_DIR)/Cargo.toml
|
||||
CARGO_TOMLS += $(RUST_DIR)/migration/Cargo.toml
|
||||
|
||||
RUSTY_STUFF := $(foreach dir, $(RUST_DIR)/src, $(wildcard $(dir)/*))
|
||||
RUSTY_STUFF += $(foreach dir, $(RUST_DIR)/migration/src, $(wildcard $(dir)/*))
|
||||
RUSTY_STUFF += $(CARGO_TOMLS)
|
||||
|
||||
|
||||
.PHONY: build
|
||||
build: build-image
|
||||
|
||||
|
||||
.PHONY: pre-commit
|
||||
pre-commit: shellcheck pnpm-lock.yaml $(RUST_DIR)/Cargo.lock regenerate-entities update-index-js rust-lint
|
||||
pre-commit: shellcheck pnpm-lock.yaml $(RUST_DIR)/Cargo.lock regenerate-entities neko/index.js rust-lint
|
||||
|
||||
|
||||
pnpm-lock.yaml: pnpm-workspace.yaml $(PACKAGE_JSONS)
|
||||
|
@ -64,8 +68,7 @@ regenerate-entities:
|
|||
$(RUST_DIR)/src/model/entity/sea_orm_active_enums.rs
|
||||
|
||||
|
||||
.PHONY: update-index-js
|
||||
update-index-js:
|
||||
neko/index.js: $(RUSTY_STUFF)
|
||||
pnpm --filter='native-utils' run build:debug
|
||||
[ -f $(RUST_DIR)/built/index.js ]
|
||||
pnpm run format
|
||||
|
|
Loading…
Reference in a new issue