1
0
Fork 1
mirror of https://example.com synced 2024-11-22 15:16:39 +09:00

dev: update neko/index.js only when rusty stuff are updated

This commit is contained in:
naskya 2024-01-22 01:34:26 +09:00
parent e1b2b2a10d
commit 7d5e062a21
Signed by: naskya
GPG key ID: 712D413B3A9FED5C

View file

@ -9,13 +9,17 @@ RUST_DIR := packages/backend/native-utils
CARGO_TOMLS := $(RUST_DIR)/Cargo.toml CARGO_TOMLS := $(RUST_DIR)/Cargo.toml
CARGO_TOMLS += $(RUST_DIR)/migration/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 .PHONY: build
build: build-image build: build-image
.PHONY: pre-commit .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) pnpm-lock.yaml: pnpm-workspace.yaml $(PACKAGE_JSONS)
@ -64,8 +68,7 @@ regenerate-entities:
$(RUST_DIR)/src/model/entity/sea_orm_active_enums.rs $(RUST_DIR)/src/model/entity/sea_orm_active_enums.rs
.PHONY: update-index-js neko/index.js: $(RUSTY_STUFF)
update-index-js:
pnpm --filter='native-utils' run build:debug pnpm --filter='native-utils' run build:debug
[ -f $(RUST_DIR)/built/index.js ] [ -f $(RUST_DIR)/built/index.js ]
pnpm run format pnpm run format